nor86/hexprint.inc

33 lines
344 B
PHP

hexprint16:
xchg ah, al
call hexprint8
xchg ah, al
hexprint8:
push ax
push bx
push cx
mov cl, al
xor bx, bx
mov ah, 0xe
shr al, 1
shr al, 1
shr al, 1
shr al, 1
mov bl, al
mov al, [.digits + bx]
int 0x10
mov bl, 0xf
and bl, cl
mov al, [.digits + bx]
int 0x10
pop cx
pop bx
pop ax
ret
.digits: db '0123456789abcdef'