summaryrefslogtreecommitdiff
path: root/v4.0/src/MAPPER/SCURPOS.ASM
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/MAPPER/SCURPOS.ASM')
-rw-r--r--v4.0/src/MAPPER/SCURPOS.ASM72
1 files changed, 72 insertions, 0 deletions
diff --git a/v4.0/src/MAPPER/SCURPOS.ASM b/v4.0/src/MAPPER/SCURPOS.ASM
new file mode 100644
index 0000000..e7af7a6
--- /dev/null
+++ b/v4.0/src/MAPPER/SCURPOS.ASM
@@ -0,0 +1,72 @@
1;
2page 60,132
3;
4title CP/DOS VioSetCurPos mapper
5;
6vioxxx segment byte public 'vio'
7 assume cs:vioxxx,ds:nothing,es:nothing,ss:nothing
8;
9; ************************************************************************* *
10; *
11; * MODULE: viosetcurpos
12; *
13; * FILE NAME: scurpos.asm
14; *
15; * CALLING SEQUENCE:
16; *
17; * push word row value
18; * push word column value
19; * push word vio handle
20; * call viosetcurpos
21; *
22; *
23; * MODULES CALLED: BIOS Int 10h
24; *
25; *************************************************************************
26
27 public viosetcurpos
28 .sall
29 .xlist
30 include macros.inc
31 .list
32
33error_bvs_parameter equ 0002h
34
35str struc
36old_bp dw ?
37return dd ?
38handle dw ? ; vio handle
39column dw ? ; column value
40row dw ? ; row value
41str ends
42
43viosetcurpos proc far
44 Enter viosetcurpos ; push registers
45
46 mov bh,0
47 mov ax,[bp].row ; get column number
48 cmp al,25 ; compare with maximum size allowed
49 jg error ; branch if illegal size
50 mov dh,al ; load row in dh
51
52 mov ax,[bp].column ; get column number
53 cmp al,80 ; check for upper boundry
54 jg error ; branch if illegal size
55 mov dl,al ; load column in dl
56
57 mov ah,02 ; set BIOS function code
58 pushal ; Save registers in case int 10h
59 ; messes them up
60 int 10h ; set cursor position
61 popal
62
63 sub ax,ax ; set good return code
64 jmp exit ; return
65
66error: mov ax,error_bvs_parameter ; set error return code
67exit: Mexit ; pop registers
68 ret size str - 6 ; return
69
70viosetcurpos endp
71vioxxx ends
72 end