BBS: Inland Empire Archive Date: 06-28-92 (14:11) Number: 1666 From: MATT HART Refer#: NONE To: PHIL HODGES Recvd: NO Subj: Bload, Bsave Conf: (2) Quik_Bas
>MH>text. Also, primitive graphics like PSET can be done
>MH>through the BIOS.
PH> I don't think PSET could be used in that particular screen mode since
Here's a PSET type function that'll work in ANY screen mode:
' BPSET.BAS Matt Hart
'
' Do a PSET in any screen mode using the BIOS
'$INCLUDE: '\BC71\QBX.BI' ' Use your path to QB.BI or QBX.BI
DEFINT A-Z ' For IDE, load with C:\>qb /l
DIM SHARED InRegs AS RegTypeX
DIM SHARED OutRegs AS RegTypeX
' ------------------ Sample Code
InRegs.AX = &H10 ' EGA 640x350x16
CALL InterruptX(&H10, InRegs, OutRegs)
' We are now in a screen mode unrecognized by QB
' No graphics command will work - QB doesn't know we are in graphics.
' This'll work with any screen mode - Super VGA, etc...
C = 1 : Y! = 0
Slope! = 350/640
FOR X = 0 TO 639
CallY = CINT(Y!) ' Y must be an integer in the CALL
CALL BiosPSET(X,CallY,C)
Y! = Y! + Slope!
C = C + 1 : IF C > 15 THEN C = 1
NEXT
WHILE INKEY$="":WEND
SCREEN 2 : SCREEN 0
' ------------------------------
SUB BiosPSET(X,Y,C)
InRegs.AX = &H0C00 + C
InRegs.BX = 0 ' BH is page - set to 0
InRegs.CX = X
InRegs.DX = Y
CALL InterruptX(&H10, InRegs, OutRegs)
END SUB
---
* Origin: Midnight Micro! V.32/REL (918)451-3306 (1:170/600)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET