Cortex M3 LSL instruction

Thread Starter

Nayani

Joined Feb 15, 2013
2
Hello all,
I am trying to use cortex m3 assembly language and found that the instructions lsl and lsr are not shifting the data as understood. I am getting a half word into a register and shifting the register by using lsl and storing the shifted data back. From the description of the instruction, if I shift left data say by 3, then the result should have the three LSBs reset (000) with the other bits shifted towards msb. This is not happening. Some times I see LSB set to 1 some times the data shifts properly. Can some one clarify please? Thank you.
 
Last edited:

Thread Starter

Nayani

Joined Feb 15, 2013
2
First off, manual says clearly 00s will be entered depending on left or right shift. Byte shift seems to perform properly.
 
Top