Subversion Repositories SvarDOS

Rev

Rev 967 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 967 Rev 1836
Line 5... Line 5...
5
; Copyright (C) 2022 Mateusz Viste
5
; Copyright (C) 2022 Mateusz Viste
6
;
6
;
7
; this is an executable image that can be set up as the critical error handler
7
; this is an executable image that can be set up as the critical error handler
8
; interrupt (int 24h). It displays the usual "Abort, retry, fail" prompt.
8
; interrupt (int 24h). It displays the usual "Abort, retry, fail" prompt.
9
;
9
;
-
 
10
; documentation:
-
 
11
; http://www.techhelpmanual.com/564-int_24h__critical_error_handler.html
-
 
12
;
10
 
13
 
11
org 0   ; this code does not have a PSP, it is loaded as-is into a memory
14
org 0   ; this code does not have a PSP, it is loaded as-is into a memory
12
        ; segment
15
        ; segment
13
 
16
 
14
; === CRIT HANDLER DETAILS ====================================================
17
; === CRIT HANDLER DETAILS ====================================================
Line 47... Line 50...
47
;   AL=3  return to application indicating a failure of the DOS function
50
;   AL=3  return to application indicating a failure of the DOS function
48
;
51
;
49
; A very basic "always fail" handler would be as simple as this:
52
; A very basic "always fail" handler would be as simple as this:
50
;   mov al, 3
53
;   mov al, 3
51
;   iret
54
;   iret
-
 
55
;
-
 
56
;
-
 
57
; *** DOS CALLS ***
-
 
58
;
-
 
59
; Warning! Be careful about using DOS fns in your Critical Error handler.
-
 
60
;          With DOS 5.0+, ONLY the following fns can be called safely:
-
 
61
;
-
 
62
;          01H-0CH (DOS character I/O)
-
 
63
;          33H (all subfns are OK, including 3306H get DOS version)
-
 
64
;          50H (set PSP address)
-
 
65
;          51H and 62H (query PSP address)
-
 
66
;          59H (get extended error information)
52
; =============================================================================
67
; =============================================================================
53
 
68
 
54
 
69
 
55
; save registers so I can restore them later
70
; save registers so I can restore them later
56
push ah
71
push ah