4 addressing modes, 1 register addressing, Real-time clock day register 0 (rtcd0) – Maxim Integrated High-Speed Microcontroller User Manual
Page 59: Real-time clock day register 1 (rtcd1), Nstruction, Iming

High-Speed Microcontroller User’s Guide
Rev: 062210
59 of 176
4.4 Addressing Modes
The high-speed microcontroller uses the standard 8051 instruction set, which a wide range of third-party
assemblers and compilers supports. Like the 8051, the high-speed microcontroller uses three memory
areas. These are program memory, data memory, and registers. Both the program and data areas are 64kB
each. They extend from 0000h to FFFFh. The register areas are located between 00h and FFh, but do not
overlap with the program and data segments. This is because the high-speed microcontroller uses
different modes of addressing to reach each memory segment. These modes are described below.
Program memory is the area from which all instructions are fetched. It is inherently read-only. This is
because the 8051 instruction set provides no instructions that write to this area. Read/write access is for
data memory and registers only. No special action is required to fetch from program memory. Each
instruction fetch will be performed automatically by the on-chip hardware. In versions that contain on-
chip memory, the hardware will decide whether the fetch is on-chip or off-chip based on the address.
Explicit addressing modes are needed for the data memory and register areas. These modes determine
which register area is accessed or if off-chip data memory is used.
The high-speed microcontroller supports eight addressing modes:
Register Addressing
Direct Addressing
Register Indirect Addressing
Immediate Addressing
Register Indirect Addressing with Displacement
Relative Addressing
Page Addressing
Extended Addressing
Five of the eight are used to address operands. The remaining are used for program control and
branching. When writing assembly language instructions that use arguments, the convention is
destination, source. Each mode of addressing is summarized below. Note that many instructions (such as
ADD) have multiple addressing modes available.
4.4.1 Register Addressing
Register Addressing is used for operands that are located in one of the eight Working Registers (R7-R0).
These are the currently selected Working Register bank, which reside in the lower 32 bytes of Scratchpad
RAM. A register bank is selected using two bits in the Program Status Word (
mode is powerful, since it uses the active bank without knowing which bank is selected. Thus one
instruction can have multiple uses by simply switching banks. Register Addressing is also a high-speed
instruction, requiring only one machine cycle. Two examples of Register Addressing are provided below.
ADD
A, R4
;Add Accumulator to register R4
INC
R2
;Increment the value in register R2
In the first case, the value in R4 is the source of the operation. In the later, R2 is the destination. These
instructions do not consider the absolute address of the register. They will act on whichever bank has
been selected.
Direct Addressing, described below, may also access any Working Register. To do this, the absolute
address must be specified.