From 16a11070a8bdf715c3683ea585bdb68398429e82 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 7 Jul 2008 13:20:05 -0700 Subject: 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. --- core/comboot.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1