
S3C7559/P7559
ADDRESS SPACES
2-7
Memory Banks 0, 1, 2, 3, and 15
Bank 0
(000H–0FFH)
The lowest 32 nibbles of bank 0 (000H–01FH) are used as working registers;
the next 224 nibbles (020H–0FFH) can be used both as stack area and as
general-purpose data memory. Use the stack area for implementing subroutine
calls and returns, and for interrupt processing.
Bank 1
(100H–1FFH)
The 256 nibbles of bank 1 (100H–1FFH) are for general-purpose use.
Bank 2
(200H–2FFH)
The 256 nibbles of bank 1 (200H–2FFH) are for general-purpose use.
Bank 3
(300H–3FFH)
The 256 nibbles of bank 1 (300H–3FFH) are for general-purpose use.
Bank 15
(F80H–FFFH)
The microcontroller uses bank 15 for memory-mapped peripheral I/O. Fixed
RAM locations for each peripheral hardware register: the port latches, timers,
peripherals controls, etc. are mapped into this area.
Data Memory Addressing Modes
The enable memory bank (EMB) flag controls the addressing mode for data memory banks 0, 1, 2, 3, or 15.
When the EMB flag is logic zero, the addressable area is restricted to specific locations, depending on whether
direct or indirect addressing is used. With direct addressing, you can access locations 000H–07FH of bank 0 and
bank 15. With indirect addressing, only bank 0 (000H–0FFH) can be accessed. When the EMB flag is set to logic
one, all five data memory banks can be accessed according to the current SMB value.
For 8-bit addressing, two 4-bit registers are addressed as a register pair. Also, when using 8-bit instructions to
address RAM locations, remember to use the even-numbered register address as the instruction operand.
Working Registers
The RAM working register area in data memory bank 0 is further divided into four register banks
(bank 0, 1, 2, and 3). Each register bank has eight 4-bit registers and paired 4-bit registers are 8-bit addressable.
Register A is used as a 4-bit accumulator and register pair EA as an 8-bit extended accumulator. The carry flag
bit can also be used as a 1-bit accumulator. Register pairs WX, WL, and HL are used as address pointers for
indirect addressing. To limit the possibility of data corruption due to incorrect register addressing, it is advisable
to use register bank 0 for the main program and banks 1, 2, and 3 for interrupt service routines.