SDA 30C163-2
2.1.3 Addressing Modes
There are five general addressing modes operating on bytes. One of these five addressing modes,
however, operates on both bytes and bits:
– register
– direct (both bytes and bits)
– register indirect
– immediate
– base-register plus index-register indirect
The following table summarizes, which memory spaces may be accessed by each of the
addressing modes:
Register Addressing
R0 – R7
ACC, B, CY (bit), DPTR
Direct Addressing
RAM (low part)
Special Function Registers
Register-Indirect Addressing
RAM (@R1, @R0, SP)
Immediate Addressing
Program Memory
Base-Register plus Index-Register Indirect Addressing
Program Memory (@DPTR + A, @PC + A)
Register Addressing
Register addressing accesses the eight working registers (R0 – R7) of the selected register bank.
The PSW-register flags RS1 and RS0 determine which register bank is enabled. The least
significant three bits of the instruction opcode indicate which register is to be used. ACC, B, DPTR
and CY, the Boolean processor accumulator, can also be addressed as registers.
Direct Addressing
Direct byte addressing specifies an on-chip RAM-location (only low part) or a special function
register. Direct addressing is the only method of accessing the special function registers. An
additional byte is appended to the instruction opcode to provide the memory location address. The
highest-order bit of this byte selects one of two groups of addresses: values between 0 and 127
(00H – 7FH) access internal RAM-locations, while values between 128 and 255 (80H – 0FFH)
access one of the special function registers.
Register-Indirect Addressing
Register-indirect addressing uses the contents of either R0 or R1 (in the selected register bank) as
a pointer to locations in the 256 bytes of internal RAM. Note that the special function registers are
not accessable by this method.
Semiconductor Group
17