summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sgabios.S5
1 files changed, 5 insertions, 0 deletions
diff --git a/sgabios.S b/sgabios.S
index 9ada0c2..6d63f58 100644
--- a/sgabios.S
+++ b/sgabios.S
@@ -1735,6 +1735,7 @@ write_char_tail:
*/
write_string:
call set_cursor_position
+ pushw %ds
pushw %es
pushw %es
popw %ds /* ds = es */
@@ -1742,7 +1743,10 @@ write_string:
testb $2, %al
jnz write_attr_string
call send_attribute /* send attribute in %bl */
+ test %cx, %cx
+ jz write_string_empty
call send_string /* plaintext out */
+write_string_empty:
jmp write_string_update_cursor
write_attr_string:
call send_attr_string /* text+attrib out */
@@ -1753,6 +1757,7 @@ write_string_update_cursor:
call set_cursor_position
write_string_tail:
popw %es
+ popw %ds
ret
/*