Skip to content

Commit cbaee52

Browse files
herbierobinsonbonzini
authored andcommitted
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. Signed-off-by: Herbie Robinson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 23d4749 commit cbaee52

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sgabios.S

+2
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,7 @@ write_string_tail:
17281728

17291729
set_cursor_position:
17301730
pushw %ax
1731+
pushw %bx
17311732
pushw %ds
17321733
pushw $BDA_SEG
17331734
popw %ds /* ds = 0x40 */
@@ -1738,6 +1739,7 @@ set_cursor_position:
17381739
movw %ax, %bx /* bx = cursor save offset */
17391740
movw %dx, (%bx) /* save new cursor value */
17401741
popw %ds
1742+
popw %bx
17411743
popw %ax
17421744
ret
17431745

0 commit comments

Comments
 (0)