The complete set of instructions that a particular computer can interpret and execute is known as Instruction Set.
It is classified into five functional categories:
- Data Transfer Instructions
- Arithmetic Instructions
- Logical Instructions
- Branching Instructions
- Machine-Control Instructions
1. Data Transfer Instructions
- These instructions move data between registers, or between memory and registers.
- These instructions copy data from source to destination (without changing the original data).
MOV [Copy from source to destination]
- The instruction copies the contents of the source register into the destination register.
- The contents of the source register are not altered.
- If one of the operands is a memory location, its location is specified by the content of the HL registers.
MVI [Move Immediate 8-bit]
- The 8-bit data is stored in the destination register or memory
- If the operand is a memory location, its location is specified by the contents of the HL registers
- Example: MVI B, 40H or MVI M, 40H
LXI [Load Register Pair Immediate]
- The 16-bit data in the operand is loaded in the register pair immediately.
- Example: LXI H, D020H
LDA [Load Accumulator Direct]
- The content of a memory location, specified by a 16-bit address in the operand, is copied to the accumulator.
- The contents of the source are not altered.
- Example: LDA 8000H
LDAX [Load Accumulator Indirect]
- The content of a memory location, pointed by a register pair in the operand, is copied to the accumulator.
- The contents of the register pair or the memory location are not altered.
- Example: LDAX D
STA [Store Accumulator Direct]
- The content of the accumulator is copied into the memory location specified by the 16-bit address in the operand.
- The content of the source is not altered.
- Example: STA 8000H
STAX [Store Accumulator Indirect]
- The content of the accumulator is copied into the memory location, pointed by a register pair in the operand.
- The contents of the register pair or the memory location are not altered.
- Example: STAX D
LHLD [Load H-L Pair Direct]
- The content of the memory location specified by the 16-bit address in the operand is copied into register L and the content of the next memory location into register H.
- Example: LHLD 8000H
SHLD [Store H-L Pair Direct]
- The content of the register L is copied into the memory location specified by the 16-bit address in the operand and the content of the register H is copied to the next memory location.
- Example: SHLD 8000H
XCHG [Exchange the contents]
- The content of the register H is exchanged with the content of register D, and the contents of register L are exchanged with the contents of register E.
- Example: XCHG