Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
In arm assembly code, I am seeing the below line where "=" is used. what exactly this operator is used in arm.

ldr r0, =CONSTANT

what constant we can use, like any address or a variable which holds the address or a value?

shall i use it like

ldr r0, =0x5 (5 is a value)

or

ldr r0, =0x400000 (where 0x400000 is an address)

or

ldr r0, =ADDR_PTR (where ADDR_PTR is a variable hoding a address)

Is all the above things correct or i am understanding something wrong here.
Posted

1 solution

Assuming from your question you do not have a copy of a reference manual, you can find the answers quite easily by following: https://www.google.com/search?q=arm+assembly[^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 2-Sep-15 13:06pm    
Fair enough, a 5.
Note that there are different compilers for the same instruction set architecture; they can have different syntax.
—SA
Richard MacCutchan 2-Sep-15 14:01pm    
Really? I would never have guessed.
Sergey Alexandrovich Kryukov 2-Sep-15 15:51pm    
:-)
chandrAN2& 3-Sep-15 0:46am    
Any link for Arm reference Manual.
Richard MacCutchan 3-Sep-15 3:01am    
Have you tried any of the links I gave you?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900