Answer the question
In order to leave comments, you need to log in
How to work with variables and constants in ARM assembler?
Let's say I declared a constant in the .data section:
vara:
.int 3
Answer the question
In order to leave comments, you need to log in
thinkingeek.com/2013/01/11/arm-assembler-raspberry...
here are the macros for loading the value of a variable into a register and unloading it into a variable:
.macro loadvar r var
ldr \r, =\var
ldr \r, [\r]
.endm
.macro storevar r var
ldr r0, =\var
str \r, [r0]
.endm
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question