Implement int 0x21 AH = 0x02, write character to stdout
This commit is contained in:
parent
1d4ffb023b
commit
d115299508
|
@ -7,9 +7,23 @@
|
|||
; outputs:
|
||||
; AL: character read from stdin
|
||||
rdin_echo:
|
||||
push ax
|
||||
mov ah, 8
|
||||
int 0x21
|
||||
; TODO does echo go to stdout or to screen?
|
||||
pop ax
|
||||
ret
|
||||
|
||||
; AH = 0x02
|
||||
; write character to stdout
|
||||
; inputs:
|
||||
; DL: character
|
||||
; outputs:
|
||||
; AL: last character output
|
||||
wrout:
|
||||
; TODO handle ^C and stuff
|
||||
; TODO handle stdout properly
|
||||
push bx
|
||||
mov al, dl
|
||||
mov bl, 0x70
|
||||
call print_character
|
||||
pop bx
|
||||
ret
|
||||
|
|
Loading…
Reference in New Issue