ST7263Bxx
Central processing unit
pointed to by the SP. Then the other registers are stored in the next locations as shown in
Figure 10.
● When an interrupt is received, the SP is decremented and the context is pushed on the
stack.
● On return from interrupt, the SP is incremented and the context is popped from the
stack.
A subroutine call occupies two locations and an interrupt five locations in the stack area.
Figure 10. Stack manipulation example
CALL
Subroutine
Interrupt
Event
PUSH Y
@ 0100h
POP Y
IRET
RET
or RSP
SP
SP
PCH
@ 017Fh PCL
SP
CC
A
X
PCH
PCL
PCH
PCL
Stack Higher Address = 017Fh
Stack Lower Address = 0100h
SP
Y
CC
A
X
PCH
PCL
PCH
PCL
CC
A
X
PCH
PCL SP
PCH
PCL
PCH
SP
PCL
Figure 11. CPU registers
7
0
RESET VALUE = XXh
7
0
RESET VALUE = XXh
7
0
RESET VALUE = XXh
15
PCH
87
PCL
0
RESET VALUE = RESET VECTOR @ FFFEh-FFFFh
7
0
1 1 1 HI NZ C
RESET VALUE = 1 1 1 X 1 X X X
15
87
0
RESET VALUE = STACK HIGHER ADDRESS
ACCUMULATOR
X INDEX REGISTER
Y INDEX REGISTER
PROGRAM COUNTER
CONDITION CODE REGISTER
STACK POINTER
X = undefined value
Doc ID 7516 Rev 8
31/186