[A83] Re: Rotate 16 bits?
[Prev][Next][Index][Thread]
[A83] Re: Rotate 16 bits?
> >rr h rr l
>
> This will not work. If the MSb of L is 1, then it is rotated into the
> carry, and then never rotated into H. That is why the ADC is needed.
>
> ; c: %0 H: %10000000 L: %10000000
> rr h ; c: %1 H: %00000000 L: %10000000
> rr L ; c: %1 H: %00000000 L: %00000001
> ; should be:
> ; c: %0 H: %00000001 L: %00000001
>
ADC? You have to modify the MSB of H, so that will be a SET 7, H in this
case after a conditional jump like in the previous example of leftward
rotation. BTW you are confusing RR with RL.
PG
--
http://www.fastmail.fm - Choose from over 50 domains or use your own
References: