You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I'm running into a problem with the right-shift operation. It seems that the rrc operation in-fills zeros or ones, independently of the carry flag.
I think I'm running into a problem with the right-shift operation. It seems that the rrc operation in-fills zeros or ones, independently of the carry flag.
I'm trying to emulate the following C code:
I think I run into a problem with the right-shift (val2>>4). This code is compiled as:
In the online emulator I get the sequence of values of:
0x4f85
0xa7c2
0xd4e1
0x69f0
0xb4f8
I.e. sometimes I get a zero infill, sometimes I get a 1 infill, even though the carry flag should be cleared by the clrc instruction.
I compile with msp430-gcc version 4.6.3:
The text was updated successfully, but these errors were encountered: