EasyManua.ls Logo

ABOV SEMICONDUCTOR MC81F4204 - 9.5 Stack Area; 9.6 Control Registers (SFR)

Default Icon
155 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MC81F4204
April 24, 2012 Ver.1.41 45
These registers also have increment, decrement, comparison and data transfer functions, and they
can be used as a simple accumulator.
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.
Figure 9-3 Stack Pointer
Figure 9-4 Stack Operation

Table of Contents