English
Language : 

MC81F4104 Datasheet, PDF (36/118 Pages) Finechips – ABOV SEMICONDUCTOR
MC81F4104
These registers also have increment, decrement, comparison and data transfer functions, and they
can be used as a simple accumulator.
Stack Address (00H – 0BFH)
15
87
00H
SP
Hardware fixed
0
00H – 0BFH
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 0BFH 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 “BFH” is used.
At execution of
A CALL/TCALL/PCALL
At execution
of RET instruction
At acceptance
of interrupt
At execution
of RETI instruction
00BF PCH
Push 00BF PCH
Pop
00BE PCL
down 00BE PCL
up
00BD
00BD
00BC
00BC
00BF
00BE
00BD
00BC
PCH
PCL
PSW
Push
down
00BF PCH
00BE PCL
Pop
up
00BD PSW
00BC
SP befor
execution
SP after
exccution
00BF
00BD
00BD
00BF
00BF
00BC
At execution
Of PUSH instruction
PUSH A(X,Y,PSW)
00BF
A
00BE
00BD
00BC
Push
down
At execution
Of POP instruction
POP A(X,Y,PSW)
00BF
A
Pop
up
00BE
00BD
00BC
SP befor
execution
SP after
exccution
00BF
00BE
00BF
00BE
00BC
00BF
00BF
Stack
Depth
0100
Figure 9-4 Stack Operation
36
October 19, 2009 Ver.1.35