SebMcClouth
Programmer
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
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