
CHAPTER 2: ARCHITECTURE
The SP1 increment/decrement affects only the
•Queue register
The queue register is provided in order to reduce the process time of the
1.When the call instruction or the PUSH instruction is executed, and when an interrupt is generated
When the CALR or CALZ instruction is executed, a software interrupt by the INT instruction is generated, and a hardware interrupt is generated, the PC value for returning is written in the memory
2.When the return instruction or the POP instruction is executed
When the RET, RETS, RETD, RETI, "POP %X" or "POP %Y" instructions are executed, the data retained in the queue register is returned to the PC, X register or Y register. Since the SP1 is incremented, the content of the queue register is renewed (it generates a bus cycle to load the content of the memory [SP1+1] to the queue register).
3.When the "LDB %SP1, %BA", "INC SP1" or "DEC SP1" instructions are executed
When these instructions are executed, the content of the queue register is also renewed (it generates a bus cycle to load the content of the memory [SP1] to the queue register).
Note: As shown above, the memory content that is indicated by the SP1 is written to the queue register according to the SP1 changes. Therefore, the queue register is not renewed even if the memory [SP1] is directly modified when the SP1 is not changed. Be aware that intended return and POP operations cannot be performed if such an operation is done.
(2)Stack pointer SP2
The SP2 is used for the normal
D15 | D8 D7 |
| D0 | ||
00H |
| 7 | SP2 | 0 | Stack pointer 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 bits to be modified
Fig. 2.3.3.3 SP2 configuration
In the case of the SP1, the
This stack is used to evacuate the F register data when an interrupt is generated. It is also used when the
The SP2 is decremented after the data is evacuated and is incremented when the data is returned.
20 | EPSON | S1C63000 CORE CPU MANUAL |