home *** CD-ROM | disk | FTP | other *** search
- '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- '% (C) 1987 HUMBLEWARE Custom Programming Author: Lawrence A. Westhaver %
- '% 247 Paul Martin Drive, Baltimore MD 21227 (301) 799-1975 %
- '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- '% %
- '% FILENAME: SCROLL.SUB LAST UPDATE: 05-24-1987 %
- '% %
- '% DESCRIPTION: Two subroutines that allow you to scroll a specified area %
- '% of the screen either up or down: %
- '% %
- '% CALL: CALL SCROLLxx(LINES%,ATTR%,TOP%,LFT%,BOT%,RGT%) %
- '% %
- '% SCROLLUP: Scrolls the defined area upward. %
- '% %
- '% SCROLLDN: Scrolls the defined area downward. %
- '% %
- '% INPUTS: LINES% = The number of screen lines to scroll. If set to %
- '% zero, the defined area will be blanked. %
- '% %
- '% ATTR% = The attribute used to fill the lines emptied by %
- '% the scroll. %
- '% %
- '% TOP% = The top row of the area to scroll. %
- '% %
- '% LFT% = The left column of the area to scroll. %
- '% %
- '% BOT% = The bottom row of the area to scroll. %
- '% %
- '% RGT% = The right column of the area to scroll. %
- '% %
- '% OUTPUTS: None. %
- '% %
- '% NOTE: This routine uses the same row and column ranges as the %
- '% QuickBASIC "LOCATE row,col" statement, where: row=(1-25) %
- '% and col=(1-80), these ranges are automatically converted %
- '% to the IBM BIOS ranges: row=(0-24) and col=(0-79). %
- '% %
- '% The Microsoft QuickBASIC INT86 assembly routine must be %
- '% linked into your program at compile time or it must be %
- '% present in the QuickBASIC USERLIB.EXE file before this %
- '% routine can be used. %
- '% %
- '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
- SUB SCROLLUP(LINES%,ATTR%,TOP%,LFT%,BOT%,RGT%) Static
-
-
- 'dim parameter storage for INT86 call
-
- DIM PARMIN%(7),PARMOUT%(7)
-
-
- 'declare indexes for INT86 calls
-
- AXREG%=0 'AX register
- BXREG%=1 'BX register
- CXREG%=2 'CX register
- DXREG%=3 'DX register
- BPREG%=4 'BP register
- SIREG%=5 'SI register
- DIREG%=6 'DI register
- FLAGS%=7 'Flags
-
-
- 'adjust row and column variables down by 1
-
- TOP%=TOP%-1
- LFT%=LFT%-1
- BOT%=BOT%-1
- RGT%=RGT%-1
-
-
- 'scroll window up
-
- POKE VARPTR(PARMIN%(AXREG%))+0,LINES%
- POKE VARPTR(PARMIN%(AXREG%))+1,&H06
-
- POKE VARPTR(PARMIN%(BXREG%))+1,ATTR%
-
- POKE VARPTR(PARMIN%(CXREG%))+0,LFT%
- POKE VARPTR(PARMIN%(CXREG%))+1,TOP%
-
- POKE VARPTR(PARMIN%(DXREG%))+0,RGT%
- POKE VARPTR(PARMIN%(DXREG%))+1,BOT%
-
- CALL INT86(&H10,VARPTR(PARMIN%(0)),VARPTR(PARMOUT%(0)))
-
-
- END SUB 'scrollup
-
-
-
- SUB SCROLLDN(LINES%,ATTR%,TOP%,LFT%,BOT%,RGT%) Static
-
-
- 'dim parameter storage for INT86 call
-
- DIM PARMIN%(7),PARMOUT%(7)
-
-
- 'declare indexes for INT86 calls
-
- AXREG%=0 'AX register
- BXREG%=1 'BX register
- CXREG%=2 'CX register
- DXREG%=3 'DX register
- BPREG%=4 'BP register
- SIREG%=5 'SI register
- DIREG%=6 'DI register
- FLAGS%=7 'Flags
-
-
- 'adjust row and column variables down by 1
-
- TOP%=TOP%-1
- LFT%=LFT%-1
- BOT%=BOT%-1
- RGT%=RGT%-1
-
-
- 'scroll window down
-
- POKE VARPTR(PARMIN%(AXREG%))+0,LINES%
- POKE VARPTR(PARMIN%(AXREG%))+1,&H07
-
- POKE VARPTR(PARMIN%(BXREG%))+1,ATTR%
-
- POKE VARPTR(PARMIN%(CXREG%))+0,LFT%
- POKE VARPTR(PARMIN%(CXREG%))+1,TOP%
-
- POKE VARPTR(PARMIN%(DXREG%))+0,RGT%
- POKE VARPTR(PARMIN%(DXREG%))+1,BOT%
-
- CALL INT86(&H10,VARPTR(PARMIN%(0)),VARPTR(PARMOUT%(0)))
-
-
- END SUB 'scrolldn
-