'>>> Page 11 of CODE0398.FAQ begins here.
' 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 (edited for
clarity and format):
[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
Apparently, this program works, but not very well. You can't
deactivate the TSR once loaded, it takes up a lot of memory, you
can't call it from the command line, and you can't run a
compiled QB program when the TSR is loaded. And they can't be
unloaded.
A better option might be PDQ by Crescent Software.
Unfortunately, the Crescent Division has shifted strictly to
'>>> Page 11 of CODE0398.FAQ ends here. Continued on next page.
___
* SLMR 2.0 * Windows Error #6523: Not Enough Windows Errors
--- Maximus/2 3.01
---------------
* Origin: The I.O. Board - 4GB -XX- V34+ (1:2255/10)
|