rdos/kernel/char.asm

31 lines
333 B
NASM
Raw Normal View History

section .text
getc: call conin
test al, al
jz getc
ret
putc: ; flag checking here
conout: mov al, dl
mov ah, 0x0e
xor bx, bx
int 0x10
ret
conio: cmp dl, 0xFF
jne conout
conin: call const
test al, al
jz .ret
mov al, 0
int 0x16
.ret: ret
const: mov ah, 1
int 0x16
jz .emp
.rdy: mov ax, 0xFF
ret
.emp: mov al, 0
ret