'=========================================================================== ' Subject: PSET ON ANY SCREEN TYPE Date: Unknown Date (00:00:00) ' Author: Matt Hart Code: QB, PDS ' Keys: PSET,ON,ANY,SCREEN,TYPE Packet: GRAPHICS.ABC '=========================================================================== '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