nor86/hexprint.inc

34 lines
357 B
PHP

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