| Electronic Components Datasheet Search |
|
D17133CS Datasheet(PDF) 54 Page - NEC |
|
|
|||||||||||||||||||||||||||||
D17133CS Datasheet(HTML) 54 Page - NEC |
|
54 / 289 page ![]() CHAPTER 6 STACK 39 6.6.3 Executing RETI Instruction Table 6-4 shows stack operation during interrupt receipt and RETI instruction execution. Table 6-4. Stack Operation during Interrupt Receipt and Return Instruction Operation Receipt of interrupt <1> Stack pointer (SP) is decremented. <2> Value in the program counter (PC) is saved in the address stack register pointed to by the stack pointer (SP). <3> Values in the PSWORD flags (BCD, CMP, CY, Z, IXE) are saved in the interrupt stack. <4> Vector address is transferred to the program counter (PC) RETI <1> Values in the interrupt stack register are restored to the PSWORD (BCD, CMP, CY Z, IXE). <2> Values in the address stack register pointed to by the stack pointer (SP) is restored to the program counter (PC). <3> Stack pointer (SP) is incremented. 6.7 STACK NESTING LEVELS AND THE PUSH AND POP INSTRUCTIONS During execution of operations such as subroutine calls and returns, the stack pointer (SP) simply functions as a 3-bit counter which is incremented and decremented. When the value in the stack pointer is 0H and a CALL or MOVT instruction is executed or an interrupt is received, the stack pointer is decremented to 7H. The µPD17120 subseries treats this condition as a fault and generates an internal reset signal. In order to avoid this condition, when the address stack register is being used frequently, the PUSH and POP instructions are used as necessary to save/return the address stack register. Table 6-5 shows stack operation during the PUSH and POP instructions. Table 6-5. Stack Operation during the PUSH and POP Instructions Instruction Operation PUSH <1> Stack pointer (SP) is decremented. <2> Value in the address register (AR) is transferred to the address stack register pointed to by the stack pointer (SP). POP <1> Value in the address stack register pointed to by the stack pointer (SP) is transferred to the address register (AR). <2> Stack pointer (SP) is incremented. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |