views:

231

answers:

1

I'm looking at some assembly for the start up of some firmware that runs on an ARM processor. The following exception vector table is defined:

    LDR     pc, =resetHandler
    LDR     pc, Undefined_Addr
    LDR     pc, SWI_Addr
    LDR     pc, Prefetch_Addr
    LDR     pc, Abort_Addr
    B       .
    LDR     pc, =irqHandler
    LDR     pc, FIQ_Addr

Does anyone know what the "." after the branch ("B") instruction does? In the disassembly window of the debugger, the instruction branches to itself. According to the data sheet, the entry is reserved, so I am guessing this just does an endless loop and waits for a watch-dog reset.

+5  A: 

In many assemblers . means the current location counter, so yes, it's just an infinite loop, i.e. "branch to here".

[Note that some assemblers use $ or * rather than .]

Paul R