home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
open
/
qbinters.lzh
/
SCROLL.BAS
< prev
next >
Wrap
BASIC Source File
|
1989-04-23
|
2KB
|
41 lines
'Sun Apr 23, 1989 2:19:43 pm
'*****************************************************************************
'This routine scrolls a window on the screen down or up by a given number of
'lines. DIR is up/down, ATTR = white/black, LINES is number of lines to scroll.
'******************************************************************************
TYPE RegType
ax AS INTEGER
bx AS INTEGER
cx AS INTEGER
dx AS INTEGER
bp AS INTEGER
si AS INTEGER
di AS INTEGER
flags AS INTEGER
END TYPE
DIM SHARED inregs AS RegType, outregs AS RegType
DECLARE SUB scroll (DIR, ATTR, lines, left, right, top, bottom)
CONST up = 0, down = 1, white = -1, black = 0
CLS
FOR x = 1 TO 25
PRINT STRING$(80, 64 + x);
NEXT x
scroll down, black, 10, 20, 60, 5, 20
SUB scroll (DIR, ATTR, lines, left, right, top, bottom)
ah = ((6 + DIR) * 256): al = lines
bh = (256 * ATTR): bl = 0
ch = ((top - 1) * 256): cl = (left - 1)
dh = ((bottom - 1) * 256): dl = (right - 1)
inregs.ax = ah + al: inregs.bx = bh + bl: inregs.cx = ch + cl: inregs.dx = dh + dl
CALL interrupt(&H10, inregs, outregs)
outax = outregs.ax: outbx = outregs.bx: outcx = outregs.cx: outdx = outregs.dx
outah = FIX(outax / 256): outal = outax - (outah * 256)
outbh = FIX(outbx / 256): outbl = outbx - (outbh * 256)
outch = FIX(outcx / 256): outcl = outcx - (outch * 256)
outdh = FIX(outdx / 256): outdl = outdx - (outdh * 256)
END SUB