Common Working Register Area (C0H-Cfh) - Samsung KS86C6004 Manual

Table of Contents

Advertisement

KS86C6004/C6008/P6008 MICROCONTROLLER (Preliminary Spec)
COMMON WORKING REGISTER AREA (C0H–CFH)
The SAM87RI register architecture provides an efficient method of working register addressing that takes full
advantage of shorter instruction formats to reduce execution time.
This 16-byte address range is called common area . That is, locations in this area can be used as working
registers by operations that address any location on any page in the register file. Typically, these working
registers serve as temporary buffers for data operations between different pages. However, because the
KS86C6004/C6008/P6008 uses only page 0, you can use the common area for any internal data operation.
The Register (R) addressing mode can be used to access this area
Registers are addressed either as a single 8-bit register or as a paired 16-bit register. In 16-bit register pairs, the
address of the first 8-bit register is always an even number and the address of the next register is an odd
number. The most significant byte of the 16-bit data is always stored in the even-numbered register; the least
significant byte is always stored in the next (+ 1) odd-numbered register.
PROGRAMMING TIP — Addressing the Common Working Register Area
As the following examples show, you should access working registers in the common area, locations C0H–CFH,
using working register addressing mode only.
Examples:
1. LD
Use working register addressing instead:
LD
2. ADD
Use working register addressing instead:
ADD
MSB
Rn
Rn + 1
Figure 2-3. 16-Bit Register Pairs
0C2H,40H
R2,40H
0C3H,#45H
R3,#45H
LSB
n = EVEN ADDRESS
; Invalid addressing mode!
; R2 (C2H) ← the value in location 40H
; Invalid addressing mode!
; R3 (C3H) ← R3 + 45H
ADDRESS SPACES
2-5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ks86c6008Ks86p6008

Table of Contents