We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all , I need some explanations for the code highlighted below.I got this code from the disassembled window. Here temp is declared as unsigned short and onech is declared as unsigned Char. I would like to know why the compiler is doing the LSL and LSR operations here in this part of the code ,though there is only one LSL I have specified in the code .(ie. (temp^onech) << 8.) Looking for help. T.Sendhilraj 74: unsigned short ans=((temp^onech) << 8); MOV R0,R1 MOV R1,R0,LSL #16 MOV R1,R1,LSR #16 MOV R0,R2 MOV R0,R0,LSL #24 MOV R0,R0,LSR #24 EOR R1,R1,R0 MOV R1,R1,LSL #8 MOV R1,R1,LSL #16 MOV R1,R1,LSR #16
Thanks a lot.