Keep DAA! (was Re: 8086 bugs)

Chuck Guzis cclist at sydex.com
Sat Dec 10 14:09:11 CST 2005


To be position-independent or deterministic, you don't need DAA to do the
conversion.  The following suffices, and I'm sure that I could do much
better with a little head scratching:

	and	al,15
	sub	al,0a
	mov	ah,al
	not	ah
	shr	ah,5               (if on 8088, you can substitute 5 shr ah,1)
	add	ah,3a
	add	al.ah

Code-cruncher quiz:  Could this be done in 8088 code without DAA or a jump
or a reference to a table in memory using only a single 8-bit register?

Cheers,
Chuck




More information about the cctalk mailing list