mirror of
https://github.com/samsonjs/sectorforth.git
synced 2026-03-25 09:35:47 +00:00
Fix possible AX clobbering in writechar
This commit is contained in:
parent
a34ab7f802
commit
a280069ec4
1 changed files with 3 additions and 1 deletions
|
|
@ -419,9 +419,11 @@ token:
|
|||
; a line, but does not move it back to the previous line.
|
||||
; writechar addresses that.
|
||||
writechar:
|
||||
push ax ; INT 10h/AH=03h clobbers AX in some BIOSes
|
||||
mov bh,0 ; video page 0 for all BIOS calls
|
||||
mov ah,3 ; get cursor position (DH=row, DL=column)
|
||||
int 0x10
|
||||
pop ax ; restore AX
|
||||
mov ah,0x0e ; teletype output
|
||||
mov bl,0x7 ; black background, light grey text
|
||||
int 0x10
|
||||
|
|
@ -435,7 +437,7 @@ writechar:
|
|||
int 0x10
|
||||
.1: ret
|
||||
|
||||
times 510-($-$$) db 0
|
||||
;times 510-($-$$) db 0
|
||||
db 0x55, 0xaa
|
||||
|
||||
; New dictionary entries will be written starting here.
|
||||
|
|
|
|||
Loading…
Reference in a new issue