BBS: Inland Empire Archive Date: 04-15-92 (19:18) Number: 172 From: MICHAEL MALLEY Refer#: NONE To: MANUEL GODINEZ Recvd: NO Subj: Re: View Print 2/ Conf: (2) Quik_Bas
>>> Continued from previous message
CASE 79 'End
CurrentCol = CurrentCol - 1
IF CurrentCol THEN
TopLine = TopLine + 1
IF TopLine < 203 THEN
GOSUB ShowScreen
ELSE
TopLine = 202
END IF
ELSE
CurrentCol = 1
END IF
CASE 73 'Page Up
CurrentCol = CurrentCol + 1
IF CurrentCol < 146 THEN
TopLine = TopLine - 1
IF TopLine THEN
GOSUB ShowScreen
ELSE
TopLine = 1
END IF
ELSE
CurrentCol = 145
END IF
CASE 81 'Page Down
CurrentCol = CurrentCol + 1
IF CurrentCol < 146 THEN
TopLine = TopLine + 1
IF TopLine < 203 THEN
GOSUB ShowScreen
ELSE
TopLine = 202
END IF
ELSE
CurrentCol = 145
END IF
END SELECT
ELSE
IF ASC(KeyStroke$) = 27 THEN EXIT DO
END IF
LOOP
END
ShowScreen:
CurrentRow = 1 'Start at the top of the screen
FOR Counter = TopLine TO TopLine + (NumberOfLines - 1)
'Manual placement off the cursor will allow printing
'on the 24th and 25 lines without screen scroll
CurrentRow = CurrentRow + 1
LOCATE CurrentRow, 1
'Assume 80 columns on the screen
PRINT MID$(Text(Counter), CurrentCol, 80);
NEXT Counter
RETURN
SUB Scroll (Row1, Col1, Row2, Col2, Lines, attr)
DIM Regs AS RegType
IF Lines < 0 THEN
Regs.ax = (256 * &H7) + (-Lines)
Regs.bx = 256 * attr
Regs.cx = 256 * (Row1 - 1) + (Col1 - 1)
Regs.dx = 256 * (Row2 - 1) + (Col2 - 1)
ELSE
Regs.ax = (256 * &H6) + Lines
Regs.bx = 256 * attr
Regs.cx = 256 * (Row1 - 1) + (Col1 - 1)
Regs.dx = 256 * (Row2 - 1) + (Col2 - 1)
END IF
Interrupt &H10, Regs, Regs
END SUB
* SLMR 2.1a * Real men *do* cry...
--- Maximus 2.01wb
* Origin: UltraTech - Nashville, TN (615) 356-0453 {HST} (1:116/30)

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