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