2.7.7 Program Counter (PC)
The program counter (PC) is a 16-bit counter to indicate the lower 16 bits of the memory address for the next
instruction code executed by the CPU.
n Program counter (PC)
The upper 8 bits of the address storing the next instruction code executed by the CPU are specified for the
program bank register (PCB), and the lower 16 bits of that address are specified for PC. The address
actually used is the 24-bit address of which the 8 bits and 16 bits are compounded (Figure 2.24). The PC
data is updated by executing the conditional branch instruction, the subroutine call instruction, by an interrupt
or reset, etc. The PC can also be used as the base pointer when reading the operand.
Upper 8 bits
PCB
FE
H
Note:
Neither the PC nor the PCB register can be rewritten directly by a program (such as MOV PC and
#FF).
CPU
Lower 16 bits
PC
ABCD
H
Fig. 2.24 Program Counter (PC)
2-25
Next instruction to be
FEABCD
executed
H