English
Language : 

MC81F4204 Datasheet, PDF (43/150 Pages) Finechips – ABOV SEMICONDUCTOR 8-BIT SINGLE-CHIP MICROCONTROLLERS
MC81F4204
These registers also have increment, decrement, comparison and data transfer functions, and they
can be used as a simple accumulator.
Stack Address (00H – 0AFH)
15
87
00H
SP
Hardware fixed
0
00H – 0AFH
Figure 9-3 Stack Pointer
Stack Pointer: Stack Pointer is an 8-bit register which indicates the current „push‟ point in the stack
area. It is used to push and pop when interrupts or general function call is occurred. Stack Pointer
identifies the location in the stack to be accessed (save or restore).
Generally, SP is automatically updated when a subroutine call is executed or an interrupt is accepted.
However, if it is used in excess of the stack area permitted by the data memory allocating
configuration, the user-processed data may be lost.
The stack can be located at any position within 00H to 0AFH of the internal data memory. The SP is
not initialized by hardware, requiring to write the initial value (the location with which the use of the
stack starts) by using the initialization routine. Normally, the initial value of “AFH” is used.
At execution of
A CALL/TCALL/PCALL
At execution
of RET instruction
At acceptance
of interrupt
At execution
of RETI instruction
00AF PCH
Push 00AF PCH
Pop
00AE PCL
down 00AE PCL
up
00AD
00AD
00AC
00AC
00AF
00AE
00AD
00AC
PCH
PCL
PSW
Push
down
00AF PCH
00AE PCL
Pop
up
00AD PSW
00AC
SP befor
execution
SP after
exccution
00AF
00AD
00AD
00AF
00AF
00AC
At execution
Of PUSH instruction
PUSH A(X,Y,PSW)
00AF
A
00AE
00AD
00AC
Push
down
At execution
Of POP instruction
POP A(X,Y,PSW)
00AF
A
Pop
up
00AE
00AD
00AC
SP befor
execution
SP after
exccution
00AF
00AE
00AF
00AE
00AC
00AF
00AF
Stack
Depth
0100
Figure 9-4 Stack Operation
October 19, 2009 Ver.1.35
43