Keep DAA! (was Re: 8086 bugs)
Christian Corti
cc at corti-net.de
Sun Dec 11 03:58:13 CST 2005
On Sun, 11 Dec 2005, Dave Dunfield wrote:
> After looking at what I posted in my previous response, I realized that I
> could do the adjustments in single instructions by alternating ACI and
> SBI instructions - took a little bit of head scratching to work through the
> carries and come up with the right numbers, however this little sequence
> will do it in only 8 instructions (plus the ANI 15 which isn't really part of
> the algorithm if you need it):
>
> ANI $0F
>
> ADI $F6
> ACI $0A
> SBI $09
> SBI $F5
> ACI $F6
> ACI $0A
> SBI $09
> SBI $C5
These are 9 instructions taking 18 bytes.
How about this:
SET R1,#$F0
LBI R2,#$F9
SLE R1,R2
SUB R1,#$39
Four instructions, eight bytes, EBCDIC character as output! Now guess what
machine this is for. Hint: the machine has no flags and no stack.
Christian
More information about the cctalk
mailing list