A96G140/A96G148/A96A148 User’s manual
4. Central processing unit ABOV
31
4.2
Addressing
The M8051EW supports six types of addressing modes as listed below:
1.
Direct addressing mode: In this mode, the operand is specified by the 8-bit address field. Only
internal data and SFRs can be accessed using this mode.
2.
Indirect addressing mode: In this mode, the operand is specified by addresses contained in a
register. Two registers (R0 and R1) from the current bank or the Data Pointer may be used for
addressing in this mode. Both internal and external Data Memory may be indirectly addressed.
3.
Register addressing mode: In this mode, the operand is specified by the top 3 bits of the
opcode, which selects one of the current bank of registers. Four banks of registers are
available. The current bank is selected by the 3
rd
and 4
th
bits of the PSW.
4.
Register specific addressing mode: In this mode, some instructions only operate on specific
registers. This is defined by the opcode. In particular many accumulator operations and some
stack pointer operations are defined in this manner.
5.
Immediate DATA mode: In this mode, Instructions which use Immediate Data are 2 or more
bytes long and the Immediate operand is stored in Program Memory as part of the instruction.
Example)
MOV A, #100
It loads the Accumulator with the decimal number 100. The same number
could be specified in hex digits as 64H.
6.
Indexed addressing mode: In this mode, only Program Memory can be addressed. It is
intended for simple implementation of look-up tables. A 16-bit base register (either the PC or
the DPTR) is combined with an offset stored in the accumulator to access data in Program
Memory.