8085-MICRO PROCESSOR INSTRUCTION SETS
8085 Micro Processor is 8 bit micro processor which has some instruction sets to perform its operation. The 8085 Instruction Set comprises of five instruction sets in this micro processor.
They are,
Arithmetic instructions, Logical instructions, Data transfer instructions, Branch instructions and I/O , stack, machine control group.
We also divide the Instruction Set into four parts namely
We also divide the Instruction Set into four parts namely
- Arithmetic Instructions
- Logical Instructions
- Data Transfer Instructions
- Branch Instructions and I/O, Stack, Machine Control Group Imstructions
ARITHMETIC INSTRUCTIONS
Arithmetic instructions include some mathematical operations such as addition subtraction increment and decrement. For addition and subtraction the quantity is always stored in accumulator. Accumulator is a register which can hold 8 bit data where the arithmetic and logic values can be stored in it.
CONVENTIONS
A - represents the accumulator.
B,C,D,E,F,H,L - represents the general purpose registers.
[A] - represents the contents of the registers A.
Similarly , [B] represents the contents of register B . i.e the square brackets represents the contents of the particular register.
[M] - represents the contents of memory location specified by the address M = xxxx ( 16 bit address ).
Double square brackets : e.g: [[B]]
If [4200] = 12 , [B] = 4200 , then [[B]] = [4200] =12.
INSTRUCTIONS
CONVENTIONS
A - represents the accumulator.
B,C,D,E,F,H,L - represents the general purpose registers.
[A] - represents the contents of the registers A.
Similarly , [B] represents the contents of register B . i.e the square brackets represents the contents of the particular register.
[M] - represents the contents of memory location specified by the address M = xxxx ( 16 bit address ).
Double square brackets : e.g: [[B]]
If [4200] = 12 , [B] = 4200 , then [[B]] = [4200] =12.
INSTRUCTIONS
1. ADD r:
ADD r means that the register content is added to the accumulator.
Example: [B] = [1 1] , [A] = [D D]
[A] + [B] = [A]
So, [A] = [E E]
Ie. = represents that arithmetic quantity is stored in accumulator.
2. ADD m:
It means that the memory content is added to the accumulator.
Example: [A] = 32, [H]= 42, [L] =01, [4201]=3F
[A] + [HL] = [A]
[A] = [71 ]
Ie. = represents that arithmetic quantity is stored in accumulator.
3. ADI 8 BIT:
It means that the 8 bit immediate data is added to the contents of accumulator.
Example: [A] = [1]
For ADI 8F:
[A] = 90
Ie. = represents that arithmetic quantity is stored in accumulator.
4.SUB R:
It means that the contents of register are subtracted from the contents of accumulator.
Example: Sub B , [B] = [11] , [A] = [CC]
[A] - [B] = [A]
[A] = [BB]
Ie. = represents that arithmetic quantity is stored in accumulator.
5. SUB M:
It means that the contents of memory location are subtracted from the contents of accumulator.
Example: [A] = [32], [H] = 42, [L]=01, [4201] = 22
4201 is the memory address
22 is the data which is stored in memory
[A] = [A] – [HL]
[A] = [10]
Ie. = represents that arithmetic quantity is stored in accumulator.
6. SBI:
It means that the 8 bit data is subtracted from the contents of accumulator.
Example: [A] = [FF]
For SBI 22
[A] = [A] – [22]
[A]=DD
[A]=DD
Ie. = represents that arithmetic quantity is stored in accumulator.
7. INR R:
It means that the content of register is increased by value 1.
Example: [B] = 01
[B] = [B] + 1
[B] = 02
Ie. = represents that arithmetic quantity is stored in accumulator.
8. DCR M:
It means that the content of register is decreased by value 1.
Example: [B] = FF
[B] = [B] – 1
[B] = FE
Ie. = represents that arithmetic quantity is stored in accumulator.
9. INR M:
It means that the data which is present in the memory is increased by a value 1.
Example: [H] = 45, [L]= 01, [4501] = 32
HL 4501 is the memory address.
32 is the data which is stored in the memory.
[H] = 45, [L] = 01, [4501] = 33
10. DCR M:
It means that the data which is present in the memory is decreased by a value 1.
Example: [H] = 45, [L]=01, [4501] = 32
HL 4501 is the memory address.
32 is the data which is stored in the memory.
[H] = 45 , [L] = 01 [4501] = 31
11. INX Rp:
It means that the content of register pair is increased by 1.
Example B 50/23 C
B 50/24 C
12. DCX Rp:
It means that the content of register pair is decreased by 1.
Example B 32/FE C
B 32/FD C
The next post will be shortly…