答案:data segment
Result db 2 dup(?)
ASCIITab:
db "0123456789ABCDEF"
data ends
code segment
assume cs:code, ds:data
start proc near
mov ax, data
mov ds, ax
mov ax, 1ah
mov bl, al
shr bl, 4
mov bh, 0
mov ah, byte ptr ASCIITab[bx]
mov Result, ah
and al, 0fh
mov bl,al
mov ah, byte ptr ASCIITab[bx]
mov Result+1,ah
jmp $
code ends
end start
(ax可以赋予你想要转换的16进制数,这里设为了1aH)
其他:问问 fwfwfwfw