Chapter 48051 - Addressing Modes | ||||||||||||||||||||||||||||||
An "addressing mode" refers to how you are addressing a given memory location. In summary, the addressing modes are as follows, with an example of each:
Immediate Addressing | MOV A,#20h |
Direct Addressing | MOV A,30h |
Indirect Addressing | MOV A,@R0 |
External Direct | MOVX A,@DPTR |
Code Indirect | MOVC A,@A+DPTR |
Each of these addressing modes provides important flexibility.
Immediate addressing is so-named because the value to be stored in memory immediately follows the operation code in memory. That is to say, the instruction itself dictates what value will be stored in memory.
For example, the instruction:
- MOV A,#20h