The RESET_STACK change broke SYSLINUX & EXTLINUX. Fix. syslinux-3.20-pre13
authorH. Peter Anvin <hpa@zytor.com>
Thu, 17 Aug 2006 22:00:50 +0000 (15:00 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 17 Aug 2006 22:00:50 +0000 (15:00 -0700)
abort.inc
comboot.inc
stack.inc

index 5b87c68..f1773b5 100644 (file)
--- a/abort.inc
+++ b/abort.inc
@@ -49,7 +49,7 @@ abort_load:
                 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
 
index a238642..e035065 100644 (file)
@@ -206,15 +206,16 @@ comboot_bogus:    cli                     ; Don't trust anyone
 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
index c3297ed..f3ec26e 100644 (file)
--- a/stack.inc
+++ b/stack.inc
@@ -20,7 +20,7 @@
 %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