From e5450b7cd33808991aa8d0747523a6874c4204e5 Mon Sep 17 00:00:00 2001 From: hpa Date: Sat, 20 Aug 2005 00:48:38 +0000 Subject: Clean up abort.inc to handle NASM bug (forward jmp through equ) --- abort.inc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/abort.inc b/abort.inc index 850a2664..d2b6c170 100644 --- a/abort.inc +++ b/abort.inc @@ -17,11 +17,10 @@ ; Code to terminate a kernel load ; + section .text ; ; abort_check: let the user abort with or ; -abort_load equ abort_check.do_abort - abort_check: call pollchar jz .ret1 @@ -30,7 +29,10 @@ abort_check: cmp al,27 ; je .kill cmp al,3 ; - jne .ret2 + je .kill +.ret2: popa +.ret1: ret + .kill: mov si,aborted_msg ; ... fall through ... @@ -44,7 +46,7 @@ abort_check: ; ; SI = offset (in _text) of error message to print ; -.do_abort: +abort_load: mov ax,cs ; Restore CS = DS = ES mov ds,ax mov es,ax @@ -63,9 +65,3 @@ abort_check: ; Return to the command prompt jmp enter_command - -; -; End of abort_check -; -.ret2: popa -.ret1: ret -- cgit v1.2.1