I am learning ARM Assembly Language. I do is write a program in c and compile it to look at the Assembly file. Below is such a compiled snippet from a program and it has this ldr r0, [pc, #28]
. Here I need help in understanding this PC thing. I know it means the program counter but I can not understand the actual purpose of the instruction.
1000037c <main>: 1000037c: b570 push {r4, r5, r6, lr} . . 10000388: f000 f812 bl 100003b0 1000038c: 4807 ldr r0, [pc, #28] 1000038e: 626c str r4, [r5, #36] . .
In the C program, it must have been an integer (>256) maybe, I don't fully understand this concept. Thanks in advance.