CHAPTER 4 INTERNAL CPU FUNCTION
70 Users Manual U10676EJ3V0UM
4.6 Accumulator
With the
µ
PD754244, the A register or XA register pair functions as an accumulator. The A register plays a central
role in 4-bit data processing, while the XA register pair is used for 8-bit data processing.
When a bit manipulation instruction is used, the carry flag (CY) is used as a bit accumulator.
Figure 4-7. Accumulator
CY Bit accumulator
A 4-bit accumulator
A 8-bit accumulatorX
4.7 Stack Pointer (SP) and Stack Bank Select Register (SBS)
The
µ
PD754244 uses a static RAM as the stack memory (LIFO). The stack pointer (SP) is an 8-bit register that
holds information on the first address of the stack area.
The stack area consists of addresses 000H to 07FH of memory bank 0. A memory bank is specified by 2-bit SBS
(refer to Table 4-2).
Table 4-2. Stack Area Selected by SBS
SBS
SBS1 SBS2
0 0 Memory bank 0
Other than above, setting prohibited
The value of SP is decremented before data is written (saved) to the stack area, and is incremented after data
has been read (restored) from the stack memory.
The data saved or restored to or from the stack are as shown in Figures 4-9 to 4-12.
The initial values of SP and SBS are respectively set by an 8-bit memory manipulation instruction and 4-bit memory
manipulation instruction, to determine the stack area. The values of SP and SBS can also be read.
Stack Area
- - - - - -