
text printing in a graphics screen with control of fore and back colors
The following routine will print text on a graphics screen. You have control
of the foreground and background colors. The routine can be included in any
basic program. Pass the parameters as specified and voila! Note that the
background color is just for the characters in the text. You have to include
the correct library or quicklibrary as well. I beleive its qb.qlb or qb.lib
for QuickBasic 4.5 and qbx.qlb or qbxqlb.lib for BAsic 7.0 and 7.1 (I might
be wrong, Its the library with support for Call Interrupt and Call InterruptX)
Go crazy
SUB graphicstext (text$, row%, col%, forecol%, backcol%) STATIC
c$ = STRING$(LEN(text$), 219)
Registers.ax = &H1300
Registers.bx = bc%
Registers.cx = LEN(text$)
Registers.dx = 256 * (row% - 1) + (col% - 1)
Registers.es = SSEG(c$)
Registers.bp = SADD(c$)
CALL InterruptX(&H10, Registers, Registers)
Registers.bx = (forecol% XOR backcol%) + &H80
Registers.es = SSEG(text$))
Registers.bp = SADD(text$)
CALL InterruptX(&H10, Registers, Registers)
END SUB
-------------------------------------------------------------------------------
Rick Burke
TH-Th-Th-thats all folks.