Fujitsu F2MC-8FX ユーザーズマニュアル

ページ / 272
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
00
H
Instruction "NOP" executed
Before execution
MEMORY
After execution
MEMORY
1234
H
1235
H
1234
H
1235
H
1234
H
00
H
XX
H
SP
SP
A
1234
H
1234
H
5678
H
5678
H
5678
H
5676
H
5676
H
5676
H
5679
H
5677
H
5677
H
5679
H
XX
H
XX
H
XX
H
XX
H
32
H
12
H
Before execution
MEMORY
After execution
MEMORY
PUSHW A
A