1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
;
page 60,132
;
title CP/DOS VioScrollUp mapper
;
vioxxx segment byte public 'vio'
assume cs:vioxxx,ds:nothing,es:nothing,ss:nothing
;
; ************************************************************************* *
; *
; * MODULE: VioScrollUp
; *
; * FILE NAME: scrollup.asm
; *
; * CALLING SEQUENCE:
; *
; *
; * push word toprow
; * push word leftcol
; * push word botrow
; * push word rightcol
; * push word lines
; * push@ dword cell
; * push word vio handle
; * call vioscrollup
; *
; * MODULES CALLED: BIOS Int 10h
; *
; *
; *
; *************************************************************************
public vioscrollup
.sall
.xlist
include macros.inc
.list
error_bvs_parameter equ 0002h
str struc
old_bp dw ?
return dd ?
handle dw ? ; vio handle
cell dd ? ; cell to be written
lines dw ? ; number of blank lines
rightcol dw ? ; right column
botrow dw ? ; bottom row
leftcol dw ? ; left column
toprow dw ? ; top row
str ends
vioscrollup proc far
Enter VioScrollUp ; save registers
mov bx,[bp].lines ; get number of blank lines
cmp bl,25 ; check for validity
jg error ; jump if invalid
mov al,bl
jmp ar02
ar01: mov al,00h
ar02: mov ah,06h ; set scroll up function code
mov bx,[bp].rightcol ; get right col number
cmp bl,80 ; check the validity
jg error ; branch if error
mov dl,bl ; right column number in DL
mov bx,[bp].botrow ; get bottom row
cmp bl,25 ; check for validity
jg error ; branch if error
mov dh,bl ; bottom row in DH
mov bx,[bp].leftcol ; get left column number
mov cl,bl ; left column in CL
mov bx,[bp].toprow ; get top row number
mov ch,bl ; top row in CH
lds si,[bp].cell ; Set up cell in BX
mov bx,ds:[si] ; *****************
; cmp bl,15 ; check validity ** assume good **
; jg error ; branch if error ** attribute! **
; *****************
mov bh,bl ; filler attribute in BH
pushal ; Save registers in case int 10h
; messes them up
int 10h ; scrollup the display
popal
sub ax,ax ; set no error code
jmp exit ; return
error: mov ax,error_bvs_parameter ; set error code
exit: Mexit ; pop registers
ret size str - 6 ; return
vioscrollup endp
vioxxx ends
end
|