ponydos/debug.inc
2023-03-20 21:42:59 +02:00

46 lines
424 B
PHP

hexprint16:
xchg ah, al
call hexprint8
xchg ah, al
hexprint8:
push ax
push cx
mov cl, 4
shr al, cl
call hexprint4
pop cx
pop ax
hexprint4:
push ax
and al, 0xf
cmp al, 10
jb .digit09
add al, 'a' - '0' - 10
.digit09:
add al, '0'
mov ah, 0x0e
int 0x10
pop ax
ret
space:
push ax
mov ax, 0x0e00 + ' '
int 0x10
pop ax
ret
hang:
hlt
jmp hang
wait_key:
push ax
xor ah, ah
int 0x16
pop ax
ret