Relative

This addressing mode is used by all branch instructions to determine the destination address. The signed byte following the opcode is added to the contents of the program counter.

As the offset is coded on a signed byte, the branching range is -127 to +128. The destination address of the branch instruction must be in this range. See the following listing for an example of using the relative addressing mode.

Listing: Relative addressing mode

main:
       NOP

       NOP

       BRA   main