User's Guide Analog-to-Digital Converter MSC1210

Description
5-2
5.1 Description
As is the case with all microcomputers from the PDP-8 onwards, the MSC1210
uses several memory addressing modes. An addressing mode refers to how
you are accessing (addressing) a given memory location or data value. In
summary, the addressing modes are listed in Table 5−1 with an example of
each.
Table 5−1.MSC1210 Addressing Modes.
Mode Example
Immediate Addressing MOV A,#20h
Direct Addressing MOV A,30h
Indirect Addressing MOV A,@R0
External Direct MOVX A,@DPTR
External Indirect MOVX A,@R0
Code Indirect MOVC A,@A+DPTR
Each of these addressing modes provides important flexibility to the programmer.
5.2 Immediate Addressing
Immediate addressing is so named because the value to be stored in memory
immediately follows the opcode in memory. That is to say, the instruction itself
dictates what value will be stored in memory. For example:
MOV A,#20h
This instruction uses immediate addressing because the accumulator (A) will
be loaded with the value that immediately follows; in this case 20
H
(hex).
Immediate addressing is very fast because the value to be loaded is included
in the instruction. However, because the value to be loaded is fixed at compile
time, it is not very flexible. It is used to load the same, known value every time
the instruction executes.