20
µ
PD17062
2.4 BRANCHING A PROGRAM
A program is branched by execution of the branch instruction (BR).
Fig. 2-2 illustrates the operation of the branch instruction.
Branch instructions (BR) are divided into two types. Direct branch instructions (BR addr) transfer control
to a program memory address (addr) directly specified in its operand. Indirect branch instructions (BR @AR)
transfer control to a program memory address specified in an address register (AR), described below.
See also Chapter 3.
2.4.1 Direct Branch
A direct branch instruction uses the least significant bit of the operation code and the 11 bits of its operand,
12 bits in total, to specify the destination program memory address. The destination of the direct branch
instruction can be any address in program memory between 0000H and 0F7FH.
2.4.2 Indirect Branch
The indirect branch instruction uses the eight-bit data of an address register to specify the destination
address. The destination of the indirect branch instruction is limited to addresses between 0000H and 00FFH.
See Section 8.1.