QiLinux -> QBinux

Discuss whatever you want here--both QB and non-QB related. Anything from the DEF INT command to the meaning of life!

Moderators: Pete, Mods

Post Reply
User avatar
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

QiLinux -> QBinux

Post by Patz QuickBASIC Creations » Tue Sep 13, 2005 6:07 pm

http://iso.linuxquestions.org/distro.php?distro=101 wrote:QiLinux is a Linux distribution made completely from scratch. It has the aim of integrating the work of the vast community of free software developers in order to creare a modern, performant, safe and easy to use system for system administrators and desktop users.
Change a few letters here and there, any you have:
My imagination wrote:QBinux is a Linux distribution made completely from scratch. It has the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users that don't mind using a DOS based system.
:lol: :lol: :lol: :lol: :lol: [/quote]

User avatar
SebMcClouth
Veteran
Posts: 240
Joined: Fri Apr 29, 2005 2:20 am
Location: Inside the Matrix

Post by SebMcClouth » Wed Sep 14, 2005 2:07 am

Sounds good... feel like joining McClouth Software?

grtz
Seb
I know why you're here. I know what you've been doing... why you hardly sleep, why you live alone, and why night after night, you sit by your computer...<br>
Unfortunately, no one can be told what Qbinux is. You have to see it for yourself.

User avatar
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Post by Patz QuickBASIC Creations » Wed Sep 14, 2005 3:15 pm

Me?

Sure. I've got nothing better to do...

Seb McClouth

Post by Seb McClouth » Thu Sep 15, 2005 3:21 am

What can you tell about PQBC?

grtz

User avatar
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Post by Patz QuickBASIC Creations » Thu Sep 15, 2005 3:15 pm

:?: I don't understand the question :?

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Thu Sep 15, 2005 3:30 pm

he wants to know more about PQBC
Image

User avatar
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Post by Patz QuickBASIC Creations » Thu Sep 15, 2005 5:18 pm

Well, to tell you the truth, I feel like I'm better with making SUBs to interface with programs. I usually design in SCREEN 0 (ASCII RULZ!) and design for the developer. I have a screen testing routine in the utilities section for download.

Modified to only return a string: (activate it in the start of your program!)

Code: Select all

' PQBC Screen Tester SUB Version
' Designed by Patrick Connor at Patz QuickBasic Creations
DIM SHARED ScreenList$
DECLARE SUB ScreenTest
SUB ScreenTest
ON ERROR GOTO handler ' Change to -ON LOCAL ERROR GOTO handler- if you are using PDS
works = 50               
test = 1
ScreenLIST$ = "-0-"
starttest:
IF test = 14 THEN GOTO ender      
IF nogo = 0 THEN SCREEN test     
IF nogo = 0 THEN LET Screenlist$ = Screenlist$ + "-" + STR$(test)
IF nogo = 0 AND works = 50 THEN LET works = test
nogo = 0                              
test = test + 1                       
GOTO starttest                        
ender:
EXIT SUB
handler:
LET nogo = 1          ' Activates the error handling variable.
RESUME NEXT
END SUB
To test if a screen mode is supported:

Code: Select all

'Make sure to use PQBC Screen Tester SUB Version to use this
IF INSTR("-9-", ScreenList$) THEN  'Can be changed to -IF NOT INSTR...
'Your code goes here. The above tests if screen mode 9 is supported.
' Change it to fit your needs.

:arrow: Sorry for not putting the test earlier :oops:

Seb McClouth

Post by Seb McClouth » Fri Sep 16, 2005 6:51 am

Code: Select all

DECLARE FUNCTION CMOSRead! (addr!)
DECLARE SUB Init ()
DECLARE SUB Main ()
DECLARE SUB TimeInit ()
'
' qbinux/init/main.qs0
'
' Copyright (C) 2005 Sebastian McClouth
'
'
'Modification history init/main.qs0
'
'12 Sep 05      Sebastian McClouth
'       Started building on MAIN.QS0. Based upon init/main.c of Linux.

'$INCLUDE: 'include/qbinux.ql0'

Main


'Yeah, yeah, it's ugly, but I cannot find how to do this correctly
'and this seems to work. If anybody has more info on the real-time
'clock I'd be interested. Most of this was trial and error, and some
'bios-listing reading. Urghh.
FUNCTION CMOSRead (addr)
        OUT &H70, addr
        CMOSRead = INP(&H71)
END FUNCTION

SUB Init
CALL Setup
END SUB

SUB Main
        TimeInit
                Init
END SUB

SUB TimeInit

        DO
          time.sec = CMOSRead(0)
          time.min = CMOSRead(2)
          time.hour = CMOSRead(4)
          time.mday = CMOSRead(7)
          time.mon = CMOSRead(8)
          time.year = CMOSRead(9)
        LOOP WHILE (time.sec = CMOSRead(0))
END SUB
What ya think about this code?

Or this one:

Code: Select all

DECLARE SUB BasicDetect ()
DECLARE SUB Video ()
'
' qbinux/boot/setup.qs0
'
' Copyright (C) 2005 Sebastian McClouth
'
'
'Modification history init/main.qs0
'
'12 Sep 05      Sebastian McClouth
'       Started building on SETUP.QS0. Based upon boot/setup.c of Linux.

'$INCLUDE: 'include/qbinux.ql0'



'-----------------------------------------------------------------------
' The machine code of the assembler procedure for GetProcInfo
'-----------------------------------------------------------------------
GetProcInfoASM:
' Number of bytes
DATA 1237
' Hexadecimal representation of machine code
DATA 55,8B,EC,9C,1E,06,56,57,8B,5E,06,8B,3F,81,EF,0A
DATA 00,8C,C8,8E,D8,8E,C0,80,BD,C7,00,FF,75,72,C6,85
DATA C9,00,00,E8,FA,00,72,11,C6,85,C7,00,00,E8,FD,00
DATA 72,5B,C6,85,C9,00,06,EB,54,E8,F8,00,72,07,C6,85
DATA C7,00,01,EB,48,E8,02,01,72,07,C6,85,C7,00,02,EB
DATA 3C,E8,06,01,72,0E,C6,85,C7,00,03,E8,24,01,88,85
DATA CB,00,EB,29,C6,85,C7,00,04,E8,9A,02,72,12,C6,85
DATA C9,00,03,E8,A3,02,80,BD,D7,00,01,75,10,E8,42,03
DATA E8,90,01,80,BD,C9,00,03,75,03,E8,5C,03,E8,91,03
DATA 8B,46,FC,8E,C0,BE,C7,00,03,F7,8B,7E,08,B9,14,00
DATA F3,A4,5F,5E,07,1F,9D,5D,CA,04,00,48,61,6E,73,20
DATA 4C,75,6E,73,69,6E,67,2C,20,31,39,39,37,FF,00,FF
DATA 00,FF,00,FF,00,FF,00,00,00,00,00,00,00,00,00,FF
DATA 00,00,00,00,00,00,00,00,00,00,00,00,00,24,00,00
DATA 00,00,00,00,47,65,6E,75,69,6E,65,49,6E,74,65,6C
DATA 41,75,74,68,65,6E,74,69,63,41,4D,44,41,4D,44,20
DATA 49,53,42,45,54,54,45,52,43,79,72,69,78,49,6E,73
DATA 74,65,61,64,55,4D,43,20,55,4D,43,20,55,4D,43,20
DATA B0,FF,B1,20,D2,E0,0A,C0,F9,75,01,F8,C3,F9,60,F8
DATA 72,01,61,C3,9C,58,8B,C8,25,FF,0F,50,9D,9C,58,25
DATA 00,F0,3D,00,F0,F9,75,01,F8,C3,81,C9,00,F0,51,9D
DATA 9C,58,25,00,F0,F9,75,01,F8,C3,8B,DC,83,E4,FC,66
DATA 9C,66,58,66,8B,C8,66,35,00,00,04,00,66,50,66,9D
DATA 66,9C,66,58,66,51,66,9D,66,33,C1,8B,E3,F9,75,01
DATA F8,C3,57,FC,B9,00,04,33,F6,F3,66,AD,B9,00,04,33
DATA F6,8B,FE,FA,B0,B0,E6,43,EB,00,32,C0,E6,42,EB,00
DATA E6,42,EB,00,E4,61,0C,01,E6,61,F3,A5,B0,80,E6,43
DATA EB,00,FB,E4,42,EB,00,8A,D0,E4,42,EB,00,8A,F0,F7
DATA DA,E4,61,24,FE,E6,61,52,B9,00,04,33,F6,8B,FE,FA
DATA B0,B0,E6,43,EB,00,32,C0,E6,42,EB,00,E6,42,EB,00
DATA E4,61,0C,01,E6,61,F3,66,A5,B0,80,E6,43,EB,00,FB
DATA E4,42,EB,00,8A,D0,E4,42,EB,00,8A,F0,F7,DA,E4,61
DATA 24,FE,E6,61,58,8B,D8,D1,EB,03,C3,3B,C2,B0,00,14
DATA 00,5F,C3,C6,85,D5,00,00,66,8B,C1,66,35,00,00,20
DATA 00,66,50,66,9D,66,9C,66,58,66,33,C1,0F,84,D5,00
DATA FE,85,D5,00,66,33,C0,0F,A2,66,89,9D,DB,00,66,89
DATA 95,DF,00,66,89,8D,E3,00,BE,DB,00,03,F7,56,57,81
DATA C7,EE,00,B9,0C,00,F3,A6,5F,5E,0B,C9,75,07,C6,85
DATA C9,00,01,EB,65,56,57,81,C7,FA,00,B9,0C,00,F3,A6
DATA 5F,5E,0B,C9,75,07,C6,85,C9,00,02,EB,4D,56,57,81
DATA C7,06,01,B9,0C,00,F3,A6,5F,5E,0B,C9,75,07,C6,85
DATA C9,00,02,EB,35,56,57,81,C7,12,01,B9,0C,00,F3,A6
DATA 5F,5E,0B,C9,75,07,C6,85,C9,00,03,EB,1D,56,57,81
DATA C7,1E,01,B9,0C,00,F3,A6,5F,5E,0B,C9,75,07,C6,85
DATA C9,00,04,EB,05,C6,85,C9,00,09,66,83,F8,01,7C,35
DATA FE,85,D5,00,66,33,C0,66,40,0F,A2,66,89,95,D1,00
DATA 8A,D0,80,E2,0F,88,95,CD,00,24,F0,C0,E8,04,88,85
DATA CB,00,8A,F4,80,E6,0F,88,B5,C7,00,80,E4,30,C0,EC
DATA 04,88,A5,CF,00,C3,33,C0,9E,B8,05,00,B3,02,F6,F3
DATA 9F,80,FC,02,F9,75,01,F8,C3,C6,85,E8,00,FF,C6,85
DATA E9,00,FF,B4,C3,E8,E3,00,8A,D0,34,80,E8,E6,00,B4
DATA C0,E8,D7,00,B4,C3,E8,D2,00,32,ED,3A,C2,74,02,FE
DATA C5,8A,C2,E8,CF,00,C6,85,D7,00,00,80,FE,01,75,18
DATA FE,85,D7,00,B4,FE,E8,B2,00,88,85,E8,00,B4,FF,E8
DATA A9,00,88,85,E9,00,EB,34,B4,C2,E8,9E,00,8A,D0,34
DATA 04,E8,A1,00,B4,C0,E8,92,00,B4,C2,E8,8D,00,32,C9
DATA 3A,C2,74,02,FE,C1,8A,C2,E8,8A,00,80,FA,01,75,07
DATA C6,85,E8,00,FE,EB,05,C6,85,E8,00,FD,8A,85,E8,00
DATA 8A,E0,24,0F,C0,EC,04,C6,85,C7,00,04,88,A5,CB,00
DATA 88,85,CD,00,3C,03,72,09,3C,0F,74,05,C6,85,C7,00
DATA 05,C3,B4,C3,E8,44,00,88,85,EA,00,24,0F,0C,10,E8
DATA 43,00,B4,E8,E8,34,00,88,85,EB,00,0C,80,E8,35,00
DATA B4,C3,8A,85,EA,00,E8,2C,00,B4,C3,E8,1D,00,88,85
DATA EA,00,24,0F,0C,10,E8,1C,00,B4,E8,8A,85,EB,00,E8
DATA 13,00,B4,C3,8A,85,EA,00,E8,0A,00,9C,FA,8A,C4,E6
DATA 22,E4,23,9D,C3,9C,FA,86,C4,E6,22,86,C4,E6,23,9D
DATA C3,9C,B2,00,80,BD,D5,00,02,75,0C,8B,85,D1,00,A8
DATA 01,74,04,B2,05,EB,7F,DB,E3,C7,85,EC,00,5A,5A,DD
DATA BD,EC,00,8B,85,EC,00,3C,00,75,6B,D9,BD,EC,00,8B
DATA 85,EC,00,25,3F,10,83,F8,3F,75,5B,B2,01,80,BD,C7
DATA 00,02,72,52,B2,02,74,4E,80,BD,C7,00,03,75,24,9B
DATA D9,E8,9B,D9,EE,9B,DE,F9,9B,D9,C0,9B,D9,E0,9B,DE
DATA D9,9B,DD,BD,EC,00,8B,85,EC,00,9E,B2,02,74,27,B2
DATA 03,EB,23,B2,05,80,BD,C7,00,04,75,1A,80,BD,D5,00
DATA 01,75,0C,F7,85,D1,00,01,00,75,0B,B2,03,EB,07,E8
DATA 0A,00,73,02,B2,03,88,95,D9,00,9D,C3,0F,20,C0,8A
DATA D8,34,10,0F,22,C0,0F,20,C0,86,C3,0F,22,C0,3A,C3
DATA F9,75,01,F8,C3

DEFINT A-Z
'Detect if we have CGA, MDA, EGA OR VGA and pass it to the kernel.
SUB BasicDetect
'PRINT "Start detecting video"
	Param.VideoEGAbx = False
	Param.HaveVGA = False
	RegsX.AX = &H1A00
	InterruptX &H10, RegsX, RegsX
	IF (RegsX.AX AND &HFF) = &H1A THEN
	  Code = RegsX.BX AND &HFF
	  IF Code = 4 OR Code = 5 THEN Param.VideoEGAbx = True
	  IF Code = 7 OR Code = 8 THEN Param.HaveVGA = True
	  IF Code = 1 THEN Console = "Monchrome MDA"
	END IF

	RegsX.AX = &H1130
	RegsX.BX = &H0
	InterruptX &H10, RegsX, RegsX
	Param.VideoLines = (RegsX.DX AND 255) + 1

	RegsX.AX = &HF00
	InterruptX &H10, RegsX, RegsX
	Param.VideoCols = (RegsX.AX AND 65280) / 256
END SUB

DEFSNG A-Z
SUB setup
IF SVGAMode THEN
  AskVGA = True
END IF

PRINT "Loading ";
Delay 1
PRINT "qbinux."

'Get memory size (extended mem, kb) - code by John Woodgate
BaseMem = CVI(CHR$(CMOSRead(&H15)) + CHR$(CMOSRead(&H16)))
ExtMem = CVI(CHR$(CMOSRead(&H17)) + CHR$(CMOSRead(&H18)))

'Check for VideoAdapter
Video

PRINT "Console: ";
	IF Param.VideoEGAbx = True THEN
	  PRINT "EGA or CGA ";
	ELSEIF Param.HaveVGA = True THEN
	  PRINT "Colour VGA ";
	ELSE
	  PRINT Console + " ";
	END IF
	PRINT LTRIM$(RTRIM$(STR$(Param.VideoCols))) + "x" + LTRIM$(RTRIM$(STR$(Param.VideoLines)))

PRINT "Memory: ";
	PRINT "/"+STRIM$(BaseMem + ExtMem)+"k available"

PRINT "CPU: "
END SUB

'DEFINT A-Z
SUB Video
'Basic adapter type (EGA/VGA/MDA/CGA)
BasicDetect
END SUB
grtz

Post Reply