summaryrefslogtreecommitdiff
path: root/ldlinux.asm
diff options
context:
space:
mode:
authorhpa <hpa>2005-08-18 21:08:56 +0000
committerhpa <hpa>2005-08-18 21:08:56 +0000
commit8d4a3ad6652e40fbe44cde878c8e0ad0c2c34a94 (patch)
tree24263cd9e6b9af5149df63b5d2a13b9042b2f2e9 /ldlinux.asm
parent1deff649355f0cdf02e7b8ffc20560d885004183 (diff)
downloadsyslinux-8d4a3ad6652e40fbe44cde878c8e0ad0c2c34a94.tar.gz
If onerror is set, invoke onerror on escape
Diffstat (limited to 'ldlinux.asm')
-rw-r--r--ldlinux.asm38
1 files changed, 2 insertions, 36 deletions
diff --git a/ldlinux.asm b/ldlinux.asm
index e415e974..1651ae18 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -926,43 +926,9 @@ getfattype:
%include "bootsect.inc"
;
-; abort_check: let the user abort with <ESC> or <Ctrl-C>
+; Abort loading code
;
-abort_check:
- call pollchar
- jz ac_ret1
- pusha
- call getchar
- cmp al,27 ; <ESC>
- je ac_kill
- cmp al,3 ; <Ctrl-C>
- jne ac_ret2
-ac_kill: mov si,aborted_msg
-
-;
-; abort_load: Called by various routines which wants to print a fatal
-; error message and return to the command prompt. Since this
-; may happen at just about any stage of the boot process, assume
-; our state is messed up, and just reset the segment registers
-; and the stack forcibly.
-;
-; SI = offset (in _text) of error message to print
-;
-abort_load:
- mov ax,cs ; Restore CS = DS = ES
- mov ds,ax
- mov es,ax
- cli
- mov sp,StackBuf-2*3 ; Reset stack
- mov ss,ax ; Just in case...
- sti
- call cwritestr ; Expects SI -> error msg
-al_ok: jmp enter_command ; Return to command prompt
-;
-; End of abort_check
-;
-ac_ret2: popa
-ac_ret1: ret
+%include "abort.inc"
;
; allocate_file: Allocate a file structure