×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

QBinux

QBinux

(OP)
It has been a while. And it's has brought you a new program. Well new? Actually based upon Linux. That's why it's called qbinux.

Here's the code. Let me know what you think of it!!

'--------------------------------------------------------------------
'QBinux Core B0.01
'--------------------------------------------------------------------
'Just to let you all know that I haven't yet included all the
'credits, I'll get to that later. To be honest, this is only the
'the real Core, like the Linux Kernel.
'
'Okay here goes:

'$include:'qb.bi' 'For whatever reason... Interrupt calling
'ofcourse... hehehe

DIM SHARED BaseMem AS INTEGER
DIM SHARED Console AS STRING
DIM SHARED ExtMem AS INTEGER
DIM SHARED PatchLevel AS INTEGER
DIM SHARED RegsX AS RegTypeX
DIM SHARED ScrCols AS INTEGER
DIM SHARED ScrRows AS INTEGER
DIM SHARED SubLevel AS INTEGER
DIM SHARED TotalMem AS INTEGER
DIM SHARED Version AS INTEGER

Version = 0 'I know this is dangerous, but hey it's
PatchLevel = 0 'still a Beta-version.
SubLevel = 1

Main 'C-ish... only that Main is the Main SUB.

SUB Boot
CLS
PRINT "Loading QBinux"
PRINT "Console: "; Console
PRINT "Memory: "; FreeMem; "/"; TotalMem; "kB"
'Does anyone know how to get the FreeMem?
PRINT "CPU: "
'Does anyone know how to get the CPUinfo through INTERRUPT?
'Or OUT/INP?
'FloppyDrive(s) are for a future release.
'Does anyone know how to get IDEinfo through INTERRUPT?
'Or OUT/INP?
END SUB

SUB Init

Setup
Boot

END SUB

SUB Main

Init

END SUB

'Copyright (C) 1991, 1992 Linus Torvalds.
'Videocard detection by Peter Norton.
SUB Setup
'----------------------------------
'Get memory size (extended mem, kB)
'----------------------------------
OUT &H70, &H15
b% = INP(&H71)
OUT &H70, &H16
b1% = INP(&H71)
BaseMem = CVI(CHR$(b%) + CHR$(b1%))
OUT &H70, &H17
b% = INP(&H71)
OUT &H70, &H18
b1% = INP(&H71)
ExtMem = CVI(CHR$(b%) + CHR$(b1%))
TotalMem = BaseMem + ExtMem

'-----------------
'Check for EGA/VGA
'-----------------
RegsX.AX = &H1A00
INTERRUPTX &H10, RegsX, RegsX
IF (RegsX.AX AND &HFF) = &H1A THEN
Code = RegsX.BX AND &HFF
SELECT CASE Code
CASE 1
Console = "MDA"
CASE 2
Console = "CGA"
CASE 4 to 5
Console = "EGA"
CASE 6
Console = "PGA"
CASE 7 to 8
Console = "VGA"
END SELECT
END IF

RegsX.AX = &H1130
RegsX.BX = &H0
INTERRUPTX &H10, RegsX, RegsX
ScrRows = (RegsX.DX and 255) + 1

RegsX.AX = &HF00
INTERRUPTX &H10, RegsX, RegsX
ScrCols = (RegsX.AX and 65280) / 256

END SUB

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close