home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
QBAS
/
WNDTOOL5.ZIP
/
SCROLL.SUB
< prev
next >
Wrap
Text File
|
1989-04-26
|
4KB
|
83 lines
'
'$PAGE
'
'******************************************************************************
' Function : *
' *
' Purpose: *
' *
' *
' Results: *
' *
' Usage : *
' *
' *
' Date Written : 01/01/89 - Date Tested: 01/01/89 - Author: James P Morgan *
' Date Modified: - : - : *
'-----------------------------------------------------------------------------*
' NOTE: *
'******************************************************************************
' *
' SUB PROGRAM NAME (PARAMETERS) STATIC/RECURSIVE *
'-----------------------------------------------------------------------------*
' *
'============================================================================
'
SUB SCROLL(ULR%,ULC%,LRR%,LRC%,LINES%,DIR%,NEWMSG$) STATIC
DEFINT A-Z 'make all short interger by default
DIM INARRY%(7) 'array of registers passed to .asm routine
DIM OUTARRY%(7) 'array of registers returned from .asm routine
ULR%=ULR%-1 'Adjust for 0 reference of parameters for BIOS call
ULC%=ULC%-1
LRR%=LRR%-1
LRC%=LRC%-1
'Prepare INARRY% variables with data for SCROLL BIOS CALL
'Determine if SCROLL UP (6) or SCROLL DOWN (7) Service
IF DIR%=1 THEN
INARRY%(0)=&h0600 'scroll up
ELSEIF DIR%=-1 THEN
INARRY%(0)=&h0700 'scroll down
ELSE
GOTO SCROLL.DONE
END IF
'Service goes in AH register
INARRY%(0)=INARRY%(0)+LINES% 'Lines goes in AL register
INARRY%(1)=SCREEN(ULR%,ULC%,1)*256% 'BH = Color Attribute of window
INARRY%(2)=(ULR%*256)+ULC% 'CH=ULR, CL=ULC
INARRY%(3)=(LRR%*256)+LRC% 'DH=LRR, DL=LRC
INARRY%(4)=0 'All other registers empty
INARRY%(5)=0
INARRY%(6)=0
INARRY%(7)=0
'Perform Scroll
INTRRPT%=&H10 'Video BIOS Interrupt
CALL INT86(INTRRPT%,VARPTR(INARRY%(0)),VARPTR(OUTARRY%(0)))
'Determine if NEWMSG$ goes on top or bottom line
IF DIR%=1 THEN
ROW%=LRR%+1 're-adjust references
ELSEIF DIR%=-1 THEN
ROW%=ULR%+1
END IF
COL%=ULC%+1 're-adjust references
ATTR%=SCREEN(ULR%,ULC%,1) 'get the attribute currently on the screen
CALL FASTPRT(NEWMSG$,ROW%,COL%,ATTR%)
SCROLL.DONE:
EXIT SUB 'return to caller
END SUB