Can anyone explain to me what this short program does?
ORIGIN 0x1000
one DEFW 13
two DEFW 29
three DEFW 0
ORIGIN 0x1010
ENTRY
ADR R0, one
LDR R1, [R0]
LDR R2, [R0, #4]
ADD R1, R2, R1
STR R1, [R0, #8]
SWI 2
If I’m thinking correctly, it adds ‘one’ to ‘two’ and places the result in ‘three’. Am I correct?
Yes.
or
Not sure about the ‘SWI 2’ It’s probably something specific to your platform. Maybe just a generic end of program call.