]>
wirehaze git hosting - MS-DOS.git/blob - v4.0/src/MAPPER/SETINT24.ASM
4 ;**********************************************************************
6 ;* MODULE: set_int24_vector
8 ;* Critical error handler for C programs BACKUP and RESTORE
10 ;*********************************************************************
11 ;------------------------------------------------------------;;;;AN000;
12 databuff
segment public 'databuff' ;;;;AN000;
13 databuff ends
;;;;AN000;
14 ;------------------------------------------------------------;;;;AN000;
17 dosxxx
segment byte public 'dos' ;AN000;
18 assume
cs:dosxxx
,ds:nothing
,es:nothing
,ss:nothing
;AN000;
21 public set_int24_vector
;AN000;
24 include macros
.inc ;AN000;
34 set_int24_vector proc
far ;AN000;
35 Enter set_int24_vector
;AN000;
37 mov ax,seg databuff
;AN000;
39 assume
ds:databuff
;AN000;
41 mov ax,03524h ;Get Int24 Vector ;AN000;
44 mov word ptr cs:OldInt24
,bx ;AN000;
45 mov word ptr cs:OldInt24
+2,es ;AN000;
47 ;Get address of my Int24 Handler
50 mov dx,offset AppErrorHandler
;AN000;
52 mov ax,02524H ;Set new INT24 vector ;AN000;
55 xor ax,ax ;Set good error return ;AN000;
57 exit: mexit
; pop all registers ;AN000;
58 ret size
str - 6 ; return ;AN000;
60 set_int24_vector endp
;AN000;
66 ;-------------------------------------------------------
68 ; **** Error Handler ******
70 ;-------------------------------------------------------
76 OldInt24 dd ?
;AN000; ;save old interrupt handler address ;;;
78 AppErrorHandler proc
near ;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
87 iret ;AN000; return to caller
88 AppErrorHandler endp
;AN000;
89 ;-------------------------------------------------------
90 ;-------------------------------------------------------