Keep DAA! (was Re: 8086 bugs)

Chuck Guzis cclist at sydex.com
Sat Dec 10 01:28:14 CST 2005


On 12/10/2005 at 12:03 AM woodelf wrote:

>It gets me confused before it returns. I think I've  seen the same code 
>in the 386 book I have.
>If it is the program segment I am thinking of that is a cute trick  if 
>it returns AL as a ascii character.

Didn't I just post that selfsame code yesterday, albeit in 8080?

How about:

	and	al,0fh
	xlate	hextable

hextable	 db	'0123456789ABCDEF'

Straightforward and fewer instructions.   Not only that, you can use ANY
character code (say, EBCDIC) for output.

Or even:

	and	al,0fh
	movzx	ebx,al
	mov	al,hextable[ebx]

--Chuck






More information about the cctalk mailing list