Direct Addressing Mode
6-8
In Example 6–5, the ADDC instruction references a data memory address that
is generated as shown following the program code. Note that if an instruction
does not perform shifts, like the ADDC instruction does not, all eight MSBs of
the instruction contain the opcode for the instruction type.
Example 6–5. Using Direct Addressing with ADDC
LDP #500 ;Set data page to 500 (addresses FA00h–FA7Fh).
ADDC 6h ;The contents of data address FA06h
;and the value of the carry bit (C) are
;added to the contents of the accumulator.
7 LSBs from IR
16-bit data address FA06h
All 9 bits from DP
DP = 500 Instruction register (IR)
0 0 0 0 1 1 01 1 1 1 1 0 1 0 0 0
ADDC opcode
1 1 1 1 1 0 1 0 0
0 0 0 0 1 1 0
6h
0 1 1 0 0 0 0 0