home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
CPROG
/
CEXPRESS.ZIP
/
GRAPHIC.ASM
/
SCRLVERT.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-05-03
|
1KB
|
45 lines
;void scroll_vert(dir,top_x,top_y,width,depth,lines,color);
; unsigned char dir,top_x,top_y,width,depth,lines,color;
EXTRN _memory_model:byte
EXTRN _video_page:byte
_TEXT SEGMENT BYTE PUBLIC 'CODE'
ASSUME CS:_TEXT
PUBLIC _scroll_vert
_scroll_vert proc near
push bp ;save BP
mov bp,sp ;set stack frame
cmp _memory_model,0 ;near or far?
jle begin ;jump if near
inc bp ;else add 2 to BP
inc bp ;
begin: mov ah,7 ;assume downward scroll
mov al,[bp+4] ;get direction code
cmp al,'D' ;downward scroll?
je L1 ;jump ahead if so
cmp al,'d' ;downward scroll?
je L1 ;jump ahead if so
mov ah,6 ;else code to scroll up
L1: mov cl,[bp+6] ;top left col in CL
dec cl ;count from 0
mov ch,[bp+8] ;top left row in CH
dec ch ;count from 0
mov dl,[bp+10] ;width in DL
dec dl ;adjust
add dl,cl ;bottom right col in DL
mov dh,[bp+12] ;depth in DH
dec dh ;adjust
add dh,ch ;bottom right row in DH
mov al,[bp+14] ;number lines in AL
mov bh,[bp+16] ;fill attribute
int 10h ;make the scroll
pop bp ;restore BP and quit
cmp _memory_model,0 ;quit
jle quit ;
db 0CBh ;RET far
quit: ret ;RET near
_scroll_vert endp
_TEXT ENDS
END