Hi,
I’m just beginning to code for the LPC-2378, and trying to understand how basic things work. I’ve seen start-up code that sets up the vector table as follows:
(at 0x00000000)
Reset: LDR PC, Reset_Addr
…
…
Reset_Addr: DCD Reset_Hdlr
My understand is they’re using LDR instead of B because this lets you jump to anywhere in the 32-bit memory space (i.e. the target address doesn’t get crammed into the instruction word using fewer bits).
But the PC is always two words ahead of the instruction being executed. If you change the value of the PC, won’t you still execute the very next instruction before “jumping” to the new address?
I have been studying documentation for more than a year on-and-off, and don’t remember coming across this.