|
Convert from hexadecimal hex to ascii 8086 Assembly. Very Useful proc
hextoasc proc near ;AX input , si point result storage addres
push ax bx cx dx si di bp es
mov cx,00h
mov bx,0ah
hexloop1:
mov dx,0
div bx
add dl,'0'
push dx
inc cx
cmp ax,0ah
jge hexloop1
add al,'0'
mov [si],al
hexloop2:
pop ax
inc si
mov [si],al
loop hexloop2
inc si
mov al,'$'
mov [si],al
pop es bp di si dx cx bx ax
ret
endp
|