summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-07-07 13:20:05 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-07-07 13:20:05 -0700
commit16a11070a8bdf715c3683ea585bdb68398429e82 (patch)
treef1df011e6ad4076dfb0541778bfee797c161fd52
parent777495330a5f0eeb6cc432497cc0bedfc01d2c25 (diff)
downloadsyslinux-16a11070a8bdf715c3683ea585bdb68398429e82.tar.gz
comboot: make sure we CLD at all relevant entry points
DF is undefined on entry, so make sure we clear it at all entry points where it could possibly matter.
-rw-r--r--core/comboot.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/comboot.inc b/core/comboot.inc
index d093471c..58bee25e 100644
--- a/core/comboot.inc
+++ b/core/comboot.inc
@@ -139,6 +139,9 @@ is_comboot_image:
jmp comboot_seg:100h ; Run it
; Proper return vector
+; Note: this gets invoked both via INT 21h and directly via INT 20h.
+; We don't need to cld explicitly here, because comboot_exit does that
+; when invoking RESET_STACK_AND_SEGS.
comboot_return: cli ; Don't trust anyone
push enter_command ; Normal return to command prompt
jmp comboot_exit
@@ -290,7 +293,7 @@ comboot_exit:
xor cx,cx
comboot_exit_msg:
pop bx ; Return address
- RESET_STACK_AND_SEGS SI
+ RESET_STACK_AND_SEGS SI ; Contains cld
call adjust_screen ; The COMBOOT program might have changed the screen
pusha
mov si,DOSSaveVectors
@@ -384,6 +387,7 @@ comboot_getchar:
%ifdef HAVE_IDLE
comboot_int28:
cli
+ cld
pushad
xor ax,ax
push ds
@@ -404,6 +408,7 @@ comboot_int28 equ comboot_iret
;
comboot_int29:
cli
+ cld
call writechr ; Preserves registers!
iret