'>>> Page 11 of CODE0498.FAQ begins here.
' SVGA.BAS by Dave Shea
' Released to Public Domain on January 18th, 1997
'
' Compile: MicroSoft QuickBasic 4.5, PDS 7.1
'
' Desc: Beginnings of a QB SVGA library. Allows you to change
' screen mode to 640x400x256, 640x480x256, 800x600x256,
' 1024x768x256 etc. Pixel routine is incredibly slow,
' unfortunatly.
'
' (Use at your own risk)
' =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
DECLARE SUB Pixel (x%, y%, Col%)
DECLARE SUB ScreenMode (SM%)
' $INCLUDE: 'qb.bi' 'Required to use
DIM SHARED InReg AS RegType, OutReg AS RegType 'CALL INTERRUPT
DEFINT A-Z 'Defines all variables as Integers
ScreenMode &H101 'Call sub ScreenMode
FOR a = 1 TO 640 'Begins "a" FOR-NEXT Loop
Col = Col + 1 'Increases variable Col
IF Col = 256 THEN Col = 1 'If Col is bigger than 256,
'then set it to 1
FOR b = 1 TO 480 'Begins "b" FOR-NEXT Loop
Pixel a, b, Col 'Call sub Pixel
NEXT 'Ends "b" FOR-NEXT Loop
NEXT 'Ends "a" FOR-NEXT Loop
SLEEP 1 'Waits for 1 second or user input
ScreenMode 3 'Return to text mode
END 'La fin!
SUB Pixel (x, y, Col)
InReg.Ax = &HC00 + Col 'Sticks your color into AX
InReg.Cx = x 'Sticks x value in CX
InReg.Dx = y 'Sticks y value in DX
CALL INTERRUPT(&H10, InReg, OutReg)'Calls Int 10h, which places
'a pixel at (x, y) with an
'attribute of Col
END SUB
SUB ScreenMode (SM)
'SM (ScreenMode) may be any one of the following:
'3 = Text Mode
'&H100 = 640x400x256
'&H101 = 640x480x256
'&H102 = 800x600x16
'&H103 = 800x600x256
'&H104 = 1024x768x16
'&H105 = 1024x768x256
InReg.Ax = &H4F02 'Sticks 4F02h in AX
InReg.Bx = SM 'Sticks ScreenMode in BX
CALL INTERRUPT(&H10, InReg, OutReg) 'Using InRegisters,
'calls Int 10h and
'sticks output (none in
'this case) into
'OutRegisters
END SUB
[end]
12) CAN I CREATE A TSR IN QB?
The real question is, do you want to use external libraries, or
do you want to use a language other than QuickBasic? If your
answer is "neither," then you can't do it very easily. But as
to the libraries, here's what Dave Shea has to say:
[quote]
Two [methods of forming TSRs] I have been informed of are
TSRV21.ZIP and PDQ.
TSRV21.ZIP can be picked up from:
http://www.cdrom.com/pub/simtelnet/msdos/qbasic
'>>> Page 11 of CODE0498.FAQ ends here. Continued on next page.
___
* SLMR 2.0 * hAS ANYONE SEEN MY CAPS LOCK KEY?
--- Maximus/2 3.01
---------------
* Origin: The I.O. Board - 4GB -XX- V34+ (1:2255/10)
|