Subversion Repositories SvarDOS

Rev

Rev 1867 | Rev 1869 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1867 Rev 1868
Line 456... Line 456...
456
;          59H (get extended error information)
456
;          59H (get extended error information)
457
;
457
;
458
; =============================================================================
458
; =============================================================================
459
HANDLER_24H:    ; +46Ch
459
HANDLER_24H:    ; +46Ch
460
 
460
 
461
; save registers so I can restore them later
461
; save registers so I can restore them later. AX does not require saving.
-
 
462
; Microsoft documentation says:
462
; this is not needed, DOS saves it already before calling the int 24h handler
463
;  "When it is desired to ignore an error, the same registers must be preserved
-
 
464
;   as when it is desired to retry the operation (SS,SP,DS,BX,CX,DX)."
463
;push ax
465
; source: INT24.DOC from MS-DOS 2.0
464
;push bx
466
push bx
465
;push cx
467
push cx
466
;push dx
468
push dx
467
;push ds
469
push ds
468
;pushf
470
pushf
469
 
471
 
470
; set DS to myself
472
; set DS to myself
471
push cs
473
push cs
472
pop ds
474
pop ds
473
 
475
 
Line 581... Line 583...
581
 
583
 
582
; was it abort?
584
; was it abort?
583
cmp cl, [CRITERR_KEYS]
585
cmp cl, [CRITERR_KEYS]
584
jne SKIP_ABORT
586
jne SKIP_ABORT
585
mov al, 2     ; AL=2 -> "abort"
587
mov al, 2     ; AL=2 -> "abort"
586
iret
588
jmp short QUIT_WITH_AL_SET
587
SKIP_ABORT:
589
SKIP_ABORT:
588
; if retry is allowed - was it retry?
590
; if retry is allowed - was it retry?
589
test ch, 0x10
591
test ch, 0x10
590
jz SKIP_RETRY
592
jz SKIP_RETRY
591
cmp cl, [CRITERR_KEYS+1]
593
cmp cl, [CRITERR_KEYS+1]
592
jne SKIP_RETRY
594
jne SKIP_RETRY
593
mov al, 1     ; AL=1 -> "retry"
595
mov al, 1     ; AL=1 -> "retry"
594
iret
596
jmp short QUIT_WITH_AL_SET
595
SKIP_RETRY:
597
SKIP_RETRY:
596
; if ignore is allowed - was it ignore?
598
; if ignore is allowed - was it ignore?
597
test ch, 0x20
599
test ch, 0x20
598
jz SKIP_IGN
600
jz SKIP_IGN
599
cmp cl, [CRITERR_KEYS+2]
601
cmp cl, [CRITERR_KEYS+2]
600
jne SKIP_IGN
602
jne SKIP_IGN
601
xor al, al    ; AL=0 -> "ignore"
603
xor al, al    ; AL=0 -> "ignore"
602
iret
604
jmp short QUIT_WITH_AL_SET
603
SKIP_IGN:
605
SKIP_IGN:
604
; if fail is allowed - was it fail?
606
; if fail is allowed - was it fail?
605
test ch, 0x08
607
test ch, 0x08
606
;jz SKIP_FAIL
608
;jz SKIP_FAIL
607
cmp cl, [CRITERR_KEYS+3]
609
cmp cl, [CRITERR_KEYS+3]
608
jne SKIP_FAIL
610
jne SKIP_FAIL
609
mov al, 3     ; AL=3 -> "fail"
611
mov al, 3     ; AL=3 -> "fail"
610
iret
612
jmp short QUIT_WITH_AL_SET
611
SKIP_FAIL:
613
SKIP_FAIL:
612
 
614
 
613
jmp CRITERR_ASKCHOICE   ; invalid answer -> ask again
615
jmp CRITERR_ASKCHOICE   ; invalid answer -> ask again
614
 
616
 
-
 
617
QUIT_WITH_AL_SET:
-
 
618
 
615
; restore registers and quit the handler
619
; restore registers and quit the handler
616
;popf
620
popf
617
;pop ds
621
pop ds
618
;pop dx
622
pop dx
619
;pop cx
623
pop cx
620
;pop bx
624
pop bx
621
;pop ax
625
iret
622
 
626
 
623
 
627
 
624
CRITERR db "CRITICAL ERROR $"
628
CRITERR db "CRITICAL ERROR $"
625
CRITERRSYST db "#XXX - SYSTEM HALTED$"
629
CRITERRSYST db "#XXX - SYSTEM HALTED$"
626
CRITERRDISK db "@: - $"
630
CRITERRDISK db "@: - $"