CHAPTER 3 CPU
3.7.7
Program Counter (PC)
The program counter (PC) is a 16-bit counter that indicates the lower 16 bits of the
memory address of the next instruction code to be executed by the CPU.
■ Program Counter (PC)
The program bank register (PCB) specifies the upper 8 bits of the address where the next instruction code
to be executed by the CPU is stored. The PC specifies the lower 16 bits. Before being used, the actual
address is combined to become 24 bits, as shown in Figure 3.7-13.
The contents of the PC are updated by conditional branch instructions, subroutine call instructions,
interrupts and resets.
The PC can be used as a bus pointer for reading operands.
Upper 8 bits
PCB
FE
Note:
The PC and PCB cannot be rewritten directly by a program (such as by MOV PC and #FF).
52
Figure 3.7-13 Program Counter (PC)
Upper 16 bits
PC ABCD
H
H
Next instruction
FEABCD
to be executed
H