SGABIOS: fix wrong video attrs for int 10h, ah==13h
PATCH v2 1/1 SGABIOS: fix wrong video attrs for int 10h, ah==13h
Fix Bug #1670509: wrong video attrs for int 10h, ah==13h The subroutine set_cursor_position is trashing %bx. Unfortunately, %bl contains the video attribute for write_string.
The fix saves %bx in the function prolog and restores it in the epilog. Also, remove save and restore in set_current_cursor, because set_cursor_position does it.
---
Removed incorrect code deletions from set_current_cursor.
sgabios.S | 2 ++ 1 file changed, 2 insertions(+)
sgabios.S +2 -0
@@ -1728,6 +1728,7 @@ write_string_tail: set_cursor_position: pushw %ax + pushw %bx pushw %ds pushw $BDA_SEG popw %ds /* ds = 0x40 */
@@ -1738,6 +1739,7 @@ set_cursor_position: movw %ax, %bx /* bx = cursor save offset */ movw %dx, (%bx) /* save new cursor value */ popw %ds + popw %bx popw %ax ret
Signature · 1 line
1.8.3.1
Quoted 11 lines · Herbie Robinson
Fix Bug #1670509: wrong video attrs for int 10h, ah==13h The subroutine
set_cursor_positionis trashing %bx. Unfortunately, %bl contains the video attribute forwrite_string.The fix saves %bx in the function prolog and restores it in the epilog. Also, remove save and restore in
set_current_cursor, becauseset_cursor_positiondoes it.Signed-off-by Herbie Robinson <[email protected]>---
Removed incorrect code deletions fromset_current_cursor.
You should update the commit message too.
Laurent
Quoted 25 lines
sgabios.S | 2 ++ 1 file changed, 2 insertions(+)sgabios.S +2
-0@@ -1728,6 +1728,7 @@ write_string_tail: set_cursor_position: pushw %ax + pushw %bx pushw %ds pushw $BDA_SEG popw %ds /* ds = 0x40 */@@ -1738,6 +1739,7 @@ set_cursor_position: movw %ax, %bx /* bx = cursor save offset */ movw %dx, (%bx) /* save new cursor value */ popw %ds + popw %bx popw %ax ret