Needed: quick way to do a 16-bit ROR
utzoo!decvax!ucbvax!unix-wizards
utzoo!decvax!ucbvax!unix-wizards
Tue Aug 11 21:37:10 AEST 1981
>From JNC Tue Aug 11 21:33:03 1981
This isn't really a UNIX question, but there are a lot of
PDP-11 people out there, so here goes: I need a quick way to do a
16 bit ROR. (The ROR instruction itself uses the C bit, for an
effective 17 bits). A 16 bit ROL can be performed by the following
code:
CLC
ROL RX
ADC RX
but I can't think of an equivalent hack for ROR that's any better than
CLC
ROR RX
BCC 1$
BIS #100000, RX
1$:
Any ideas? (Improvements to the former are welcome as well!)
Noel
PS Please reply to me, not the whole list! If there is general
interest, I will forward the best reply.
-------
More information about the Comp.unix.wizards
mailing list