First page Back Continue Last page Overview Graphics
Data Transfer Instructions: LDAB
LDAB (Load Accumulator B)
Example: LDAB #24 ;assembly instruction
- Location Contents
- E000 C6 (Opcode)
- E001 18 (Operand)
- What is the value in B after execution of the instruction? 18 hex
- How many memory accesses are required to execute this instruction (assuming the data bus is 16-bit)? 1
- Why are the location addresses 16-bit numbers? Address bus is 16-bit.
Note that unlike data, opcodes are always specified in hex.
Here we see that the opcode (C6) for the LDAB instruction is different from the opcode (86) for the LDAA instruction.
Most of the instructions in a program are data transfer instructions. Data transfer instructions can be used to move data to a register in preparation for an arithmetic or logic operation.