BBS: Inland Empire Archive Date: 02-23-93 (08:30) Number: 358 From: DAVID COLSTON Refer#: NONE To: ALL Recvd: NO Subj: Printing to CON Conf: (2) Quik_Bas
Several people have been asking about "fast ansii". Most of you have
suggest opening the screen as a device and printing that way. Here is
another.
Feel free to abuse this in anyway you wish.<g> This also maintains the
25 line free.
SUB PrintCon (A$, Reg AS RegType) STATIC
IF A$="" THEN EXIT SUB
Reg.AX = &H600
Reg.dx = ASC(A$)
Interrupt &H21, Reg, Reg 'Print the character
Reg.AX = &H3 * 256 'Cursor check
Reg.BX = 0
Interrupt &H10,Reg, Reg
Row% = Reg.dx \ 256 + 1
Col% = (Reg.dx MOD 256)+ 1
IF Col% > 80 THEN Col% = 80
LOCATE Row%, Col% 'Release, I'm not sure why this routine locks
'the position unless you locate afterward.
IF Row% = 25 THEN 'OOPS , we're on line 25!
Row% = 24
VIEW PRINT 1 TO 24
LOCATE 24, 80
PRINT
LOCATE 24, Col%
END IF
END SUB
* OLX 2.1 TD * !esrever ni kcuts m'I ,pleH
--- WM v2.07/92-0178
* Origin: Paradox of Arkansas 501-484-0944 (1:3822/1)

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