summaryrefslogtreecommitdiff
path: root/v4.0/src/MAPPER/SETINT24.ASM
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/MAPPER/SETINT24.ASM')
-rw-r--r--v4.0/src/MAPPER/SETINT24.ASM94
1 files changed, 94 insertions, 0 deletions
diff --git a/v4.0/src/MAPPER/SETINT24.ASM b/v4.0/src/MAPPER/SETINT24.ASM
new file mode 100644
index 0000000..9e3e8d8
--- /dev/null
+++ b/v4.0/src/MAPPER/SETINT24.ASM
@@ -0,0 +1,94 @@
1;0
2page 80,132
3
4;**********************************************************************
5;*
6;* MODULE: set_int24_vector
7;*
8;* Critical error handler for C programs BACKUP and RESTORE
9;*
10;*********************************************************************
11;------------------------------------------------------------;;;;AN000;
12databuff segment public 'databuff' ;;;;AN000;
13databuff ends ;;;;AN000;
14;------------------------------------------------------------;;;;AN000;
15
16
17dosxxx segment byte public 'dos' ;AN000;
18 assume cs:dosxxx,ds:nothing,es:nothing,ss:nothing ;AN000;
19
20
21 public set_int24_vector ;AN000;
22 .sall ;AN000;
23 .xlist ;AN000;
24 include macros.inc ;AN000;
25 .list ;AN000;
26
27str struc ;AN000;
28old_bp dw ? ;AN000;
29Return dd ? ;AN000;
30Flag dw ? ;AN000;
31str ends ;AN000;
32
33
34set_int24_vector proc far ;AN000;
35 Enter set_int24_vector ;AN000;
36
37 mov ax,seg databuff ;AN000;
38 mov ds,ax ;AN000;
39 assume ds:databuff ;AN000;
40
41 mov ax,03524h ;Get Int24 Vector ;AN000;
42 int 21h ;AN000;
43 ;Save it
44 mov word ptr cs:OldInt24,bx ;AN000;
45 mov word ptr cs:OldInt24+2,es ;AN000;
46
47 ;Get address of my Int24 Handler
48 mov dx,cs ;AN000;
49 mov ds,dx ;AN000;
50 mov dx,offset AppErrorHandler ;AN000;
51
52 mov ax,02524H ;Set new INT24 vector ;AN000;
53 int 21h ;AN000;
54
55 xor ax,ax ;Set good error return ;AN000;
56
57exit: mexit ; pop all registers ;AN000;
58 ret size str - 6 ; return ;AN000;
59
60set_int24_vector endp ;AN000;
61
62
63
64
65
66;-------------------------------------------------------
67;
68; **** Error Handler ******
69;
70;-------------------------------------------------------
71Ignore equ 0 ;AN000;
72Retry equ 1 ;AN000;
73Abort equ 2 ;AN000;
74Fail equ 3 ;AN000;
75
76OldInt24 dd ? ;AN000; ;save old interrupt handler address ;;;
77
78AppErrorHandler proc near ;AN000;
79 pushf ;AN000;
80 call dword ptr cs:OldInt24 ;AN000; Get user to respond
81 cmp al,Abort ;AN000; For any resonse other than Abort
82 jne rett ;AN000; retry the operation
83
84 int 023h ;AN000;
85
86rett: ;AN000;
87 iret ;AN000; return to caller
88AppErrorHandler endp ;AN000;
89;-------------------------------------------------------
90;-------------------------------------------------------
91
92dosxxx ends ;AN000;
93 end ;AN000;
94 \ No newline at end of file