Fujitsu F2MC-8FX Computer Hardware User Manual


 
17
CHAPTER 3 REGISTERS
3.2 Program Counter (PC) and Stack Pointer (SP)
The program counter (PC) and stack pointer (SP) are application-specific registers
existing in the CPU.
The program counter (PC) indicates the address of the location at which the instruction
currently being executed is stored.
The stack pointer (SP) holds the addresses of the data location to be referenced by the
interrupt and stack push/pop instructions. The value of the current stack pointer (SP)
indicates the address at which the last data pushed onto the stack is stored.
Program Counter (PC)
Figure 3.2-1 shows the operation of the program counter (PC).
Figure 3.2-1 Program Counter Operation
Stack Pointer (SP)
Figure 3.2-2 shows the operation of the stack pointer (SP).
Figure 3.2-2 Stack Pointer Operation
PC
PC
00H
Instruction "NOP" executed
Before execution
MEMORY
After execution
MEMORY
1234
H
1235H
1234H
1235H
1234H
00H
XXH
SP SP
A
1234
H
1234H
5678H
5678H
5678H
5676H
5676H
5676H
5679H
5677H
5677H
5679H
XXH
XXH
XXH
XXH
32H
12H
Before execution
MEMORY
After execution
MEMORY
PUSHW A
A