CHAPTER 3 PROGRAM COUNTER (PC)
20
Figure 3-2. Value of the Program Counter after an Instruction Is Executed
Program Counter Bit
Program Counter Value
Instruction
PC9 PC8 PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0
During reset
0
0
0
0
0
0
0
0
0
0
BR addr
CALL addr
BR @AR
CALL @AR
Value in the address register (AR)
(MOVT DBF, @AR)
RET
RETSK
RETI
During interrupt
Each interrupted vector address
3.2.1 Program Counter at Reset
By setting the RESET terminals to low, the program counter is set to 000H.
Figure 3-3. Value in the Program Counter after Reset
Value set by addr
Value in the address stack register location pointed to the
stack pointer (return address)
MSB
0
All bits are set to 0
0
0
0
0
0
0
0
0
0
LSB
3.2.2 Program Counter during Execution of the Branch Instruction (BR)
There are two ways to specify branching using the branch instruction. One is to specify the branch address in
the operand using the direct branch instruction (BR addr). The other is to branch to the address specified by the
address register using the indirect branch instruction (BR @AR).
The address specified by a direct branch instruction is placed in the program counter.
Figure 3-4. Value in the Program Counter during Execution of a Direct Branch Instruction
MSB
PC9
PC8
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
LSB
Address specified by addr
An indirect branch instruction causes the address in the address counter to be placed in the program counter.
Summary of Contents for mPD17120 Subseries
Page 15: ... x MEMO ...
Page 23: ... MEMO 8 ...
Page 45: ... MEMO 30 ...
Page 49: ... MEMO 34 ...
Page 55: ... MEMO 40 ...
Page 93: ... MEMO 78 ...
Page 99: ... MEMO 84 ...
Page 102: ...CHAPTER 11 ARITHMETIC AND LOGIC UNIT 87 MEMO ...
Page 119: ... MEMO 104 ...
Page 175: ... MEMO 160 ...
Page 199: ... MEMO 184 ...
Page 265: ... MEMO 250 ...
Page 281: ...266 MEMO ...
Page 285: ... MEMO 270 ...
Page 289: ... MEMO 274 ...