This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM, help loading an address to a register

I have this code

AREA datos, DATA, READWRITE
long    EQU 7*4
serie   DCD 1, 2, 4, 6, 8, 7, 9
resul   DCB 0
    AREA prog, CODE, READONLY

    ENTRY
    mov r0, #0
    eor r1, r1, r1  ;result variable

    ldr r2, =serie
buc     ldr r3, [r2, r0]
    add r1, r1, r3
    add r0, r0, #4
    cmp r0, #long
    bne buc

    ldr r2, =resul
    str r1, [r2]

fin     b fin

    END

The problem is that in the instruction ldr r2, =serie I dont understand what its doing, I dont know the address of the value serie.I have seen that its the same that ldr r2,[pc, #offset] but I dont know the offset value.