2 ; -----------------------------------------------------------------------
4 ; Copyright 2005 H. Peter Anvin - All Rights Reserved
6 ; This program is free software; you can redistribute it and/or modify
7 ; it under the terms of the GNU General Public License as published by
8 ; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9 ; Boston MA 02111-1307, USA; either version 2 of the License, or
10 ; (at your option) any later version; incorporated herein by reference.
12 ; -----------------------------------------------------------------------
17 ; Code to terminate a kernel load
22 ; abort_check: let the user abort with <ESC> or <Ctrl-C>
36 .kill: mov si,aborted_msg
38 ; ... fall through ...
41 ; abort_load: Called by various routines which wants to print a fatal
42 ; error message and return to the command prompt. Since this
43 ; may happen at just about any stage of the boot process, assume
44 ; our state is messed up, and just reset the segment registers
45 ; and the stack forcibly.
47 ; SI = offset (in _text) of error message to print
50 mov ax,cs ; Restore CS = DS = ES
53 %if IS_SYSLINUX || IS_EXTLINUX
54 mov ss,ax ; Just in case...
55 mov sp,StackBuf-2*3 ; Reset stack
61 NEED TO KNOW HOW TO RESET STACK
64 call cwritestr ; Expects SI -> error msg
66 ; Return to the command prompt