mov ax,cs ; Restore CS = DS = ES
mov ds,ax
mov es,ax
- RESET_STACK
+ RESET_STACK ; AX must = 0
sti
call cwritestr ; Expects SI -> error msg
comboot_exit:
mov bx,enter_command ; Normal return to command prompt
comboot_exit_special:
- xor dx,dx
- mov ds,dx
- mov es,dx
- RESET_STACK
+ mov cx,ax
+ xor ax,ax
+ mov ds,ax
+ mov es,ax
+ RESET_STACK ; AX must = 0
sti
cld
call adjust_screen ; The COMBOOT program might have changed the screen
- and ax,ax
- je .nomsg
+ jcxz .nomsg
+ mov ax,cx
mov si,KernelCName
call cwritestr
xchg si,ax
%define _STACK_INC
;
-; This macro resets the stack pointer. It assumes CS == DS.
+; This macro resets the stack pointer. It assumes CS == DS and AX == 0.
;
%macro RESET_STACK 0
%if IS_SYSLINUX || IS_EXTLINUX