struck with this code

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

syntax:
st.w Rp[disp], Rs

Operation:

*(Rp + SE(disp16)) ← Rs;

"mov R1,27\n"
        "mov R2,1\n"
        

        "lsl R3,R2,R1\n"
        "st.w R0[0x04],R3\n"

what this format R0[0x04] will do exactly?

what does this store word represents,storing the R3 value at R0+(sign extension of 0x04)?

what is the value in R0?

How to find resultant address, where contents of R3 are storing?

I also tried like this:

"mov R1,27\n"
        "mov R2,1\n"

        "lsl R3,R2,R1\n"
    		
    	"mov R0 0x00000000\n"	

        "st.w R0[0x04],R3\n"

I got an error by doing like this?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You have to look further back in the disassembly to see where R0 is initialized.

Letting the smoke out since 1978

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for ur reply

what do you mean by de-assembly?

Can you please explain in detail?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Let me ask you a few questions. Did you write this code? I assume not since you are asking questions about how it works. What is the code from? Where did you get it?

Letting the smoke out since 1978