In diploma engineering notes, this is the important topic of 8051. Poly Notes Hub shares a topic in about the instruction set of 8085 microprocessor.
What is Instruction set?
An instruction is a command to the microprocessor or microcontroller to perform a given task on specific data.
Each instruction has two parts:
- Operation Code– It is the task to be performed. It is also called op-code.
- Operand– It is the data to be operated on.
Instruction set word size
The 8085 microprocessor instruction set is classified into the following three groups according to the word size or byte size.
In 8085, “byte” and “word” are synonymous because it is an 8-bit microprocessor. However, instructions are commonly referred to in terms of bytes rather than words.
- 1-byte instruction
- 2-byte instruction
- 3-byte instruction
One-byte instruction set of 8085
A 1-byte instruction includes the opcode and the operand in the same byte. For example-
Task | Opcode | Operand | Binary Code | Hex Code |
---|---|---|---|---|
Copy the contents of accumulator in the register C | MOV | C,A | 0100 1111 | 4FH |
Add the content of register B to Accumulator | ADD | B | 1000 0000 | 80H |
Invert each bit the Accumulator | CMA | 0010 1111 | 2FH |
Two-byte instruction set of 8085
In 2-byte instruction, the first byte specifies the operation code and the second byte specifies the operand. For example-
Task | Opcode | Operand | Binary Code | Hex code |
---|---|---|---|---|
Load an 8-bit data byte in the Accumulator | MVI | A, 32H | 0011 1110 0011 0010 | 3EH 32H |
Load an 8-bit data byte in register B | MVI | B, F2H | 0000 0110 1111 0010 | 06H F2H |
Three-byte instruction set of 8085
In a 3-byte instruction, the first byte specifies the opcode, and the following two bytes specifies the 16-bit address. Note that the second byte is the low-order address and the third byte is the high-order address.
Task | Opcode | Operand | Binary Code | Hex code |
---|---|---|---|---|
Load content of memory 2050H into A | LDA | 2050H | 0011 1010 0101 0000 0010 0000 | 3AH 50H 20H |
Transfer the program sequence to memory location 2085H. | JMP | 2085H | 1100 0011 1000 0101 0010 0000 | C3H 85H 20H |