Opcodes:
Opcodes mean “operation codes”.
• An opcode is the first part of an instruction that tells the computer what function to perform.
• Every computer has an operation code or opcode for each of its functions.
• It is an instruction that tells the processor what to do with the variable or data written beside it.
Operand:
An operand is the second part of the instruction, which tells the computer where to find or store the data or instructions. The number of operands varies among computers.
• Each instruction tells the Control Unit of the CPU what to do and how to do it.
• The operations are Arithmetic, Logical, Branch operation, etc. depending upon the problem that is given to the computers.
Note:
- The Intel 8085 is an 8-bit microprocessor that was widely used in early computing devices.
- It uses a set of instructions, each represented by a unique operation code (opcode), along with operands to perform various tasks.
Here are some common operation codes and their corresponding operands in the Intel 8085 assembly language:
- MOV (Move):
- Opcode:
MOV
- Operands:
MOV Rd, Rs
- Example:
MOV B, A
(copies the contents of register A to register B)
- Opcode:
- ADD (Addition):
- Opcode:
ADD
- Operands:
ADD R
- Example:
ADD B
(adds the contents of register B to the accumulator)
- Opcode:
- SUB (Subtraction):
- Opcode:
SUB
- Operands:
SUB R
- Example:
SUB C
(subtracts the contents of register C from the accumulator)
- Opcode:
- INR (Increment):
- Opcode:
INR
- Operands:
INR R
- Example:
INR D
(increments the contents of register D by 1)
- Opcode:
- DCR (Decrement):
- Opcode:
DCR
- Operands:
DCR R
- Example:
DCR E
(decrements the contents of register E by 1)
- Opcode:
- MVI (Move Immediate):
- Opcode:
MVI
- Operands:
MVI R, data
- Example:
MVI A, 20H
(loads the immediate value 20H into register A)
- Opcode:
- HLT (Halt):
- Opcode:
HLT
- Operands: None
- Example:
HLT
(halts the microprocessor)
- Opcode:
- JMP (Jump):
- Opcode:
JMP
- Operands:
JMP address
- Example:
JMP 2000H
(jumps to the memory address 2000H)
- Opcode:
- CALL (Call Subroutine):
- Opcode:
CALL
- Operands:
CALL address
- Example:
CALL 3000H
(calls a subroutine at the memory address 3000H)
- Opcode:
- RET (Return from Subroutine):
- Opcode:
RET
- Operands: None
- Example:
RET
(returns from a subroutine)
- Opcode: