Hello, I am writing an assembler program that encodes (converts) a binary number into a two-digit hexadecimal number. Wrote this code:
.model small .data HEXDIGIT DB "0123456789ABCDEF" VAR1 DB 10011001b .stack 256 .code main: mov ax, @data mov ds, ax MOV AL , VAR1 MOV BX , OFFSET HEXDIGIT XLAT MOV DL , AL MOV AH , 02H INT 21H mov ax,4c00h int 21h end main But I suffer a fiasco:

shr al,4) - get the xlat first character, then return the original number in al and leave the low 4 bits from it (and al,0Fh) and get the second character - Mike