> AND AL,00fh
> ADD AL,090h
> DAA
> ADC AL,040h
> DAA
> RET
or:
AND AL, 0Fh
DAA
ADD AL, 0F0h
ADC AL, 40h
or:
AND AL, 0Fh
ADD AL, 0
ADC AL,28h
DAA
and, of course, it can be extended to 16 bits with screen display by:
MOV CX, 0404h ; CH and CL are independent
N1: ROL AX, CL
PUSH AX
AND AL, 0Fh
DAA
ADD AL, 0F0h
ADC AL, 40h
MOV AH, 0Eh ;displays char in AL at cursor position
INT 10h
POP AX
DEC CH
JNZ N1
--
Grumpy Ol' Fred cisin at
xenosoft.com