two-instruction method to rotate carry-Not into register?
ags
Posts: 386
Is there any way to rotate the negated value of the carry flag into a register? I see such an instruction doesn't exist, but is there an ingenious way to do this in two instructions? There's a muxnc for muxc, a negnc for negc, but no rcnr for rcr. The application is difficult to explain, and I can simply xor the final result with -1. That causes some other problems. The typical code is:
I'm looking to get the inverse of the LSB of reg1 shifted (rotated) into the MSB of reg2, in two instructions. Is that possible?
shr reg1, #1 wc rcr reg2, #1
I'm looking to get the inverse of the LSB of reg1 shifted (rotated) into the MSB of reg2, in two instructions. Is that possible?
Comments
Jonathan
P.S. I was wishing for a ADDNX command, but alas, it is not available.
@lonesock: I am using an xor now, but it's messy and I was hoping for an alternative.
Thanks.
Jonathan