First page Back Continue Last page Overview Graphics
Data Transfer Instructions: LDD
LDD (Load Double Accumulator D)
Example: LDD #$1024 ;assembly instruction
- Location Contents
- E000 CC (Opcode)
- E001 10 (Operand, first byte)
- E002 24 (Operand, second byte)
- What values are in A, B and D? 10, 24, and 1024 hex, respectively
- Why are two bytes of operands required? D is 16-bit
- How many byte-sized memory accesses are required to execute the instruction? 3 for code, 2 for data
Register D is made up of registers A & B. Register A is the most significant part of D and register B is the least significant part of D. Changing D can change both A and B and vice versa. Since register D is a 16-bit register, a two byte operand is required.
The instruction, LDD #$1058, loads a 10 hex into register A and a 58 hex into register B.
Some examples of opcodes that use immediate addressing are:
CC ( LDD)