Arithmetic instructions in 8085 microprocessor
Arithmetic Instructions are the instructions which perform basic arithmetic operations such as addition, subtraction and a few more. In 8085 microprocessor, the destination operand is generally the accumulator. Following is the table showing the list of arithmetic instructions:
Opcode | Operand | Explanation | Example |
---|---|---|---|
ADD | R | A = A + R | ADD B |
ADD | M | A = A + Mc | ADD 2050 |
ADI | 8-bit data | A = A + 8-bit data | ADI 50 |
ADC | R | A = A + R + prev. carry | ADC B |
ADC | M | A = A + Mc + prev. carry | ADC 2050 |
ACI | 8-bit data | A = A + 8-bit data + prev. carry | ACI 50 |
SUB | R | A = A – R | SUB B |
SUB | M | A = A – Mc | SUB 2050 |
SUI | 8-bit data | A = A – 8-bit data | SUI 50 |
SBB | R | A = A – R – prev. carry | SBB B |
SBB | M | A = A – Mc -prev. carry | SBB 2050 |
SBI | 8-bit data | A = A – 8-bit data – prev. carry | SBI 50 |
INR | R | R = R + 1 | INR B |
INR | M | M = Mc + 1 | INR 2050 |
INX | r.p. | r.p. = r.p. + 1 | INX H |
DCR | R | R = R – 1 | DCR B |
DCR | M | M = Mc – 1 | DCR 2050 |
DCX | r.p. | r.p. = r.p. – 1 | DCX H |
DAD | r.p. | HL = HL + r.p. | DAD H |
1 Add) – The content of operand are added to the content of the accumulator and the result is stored in accumulator .
with the addition instruction , the following 3 operations can be done.
1) any 8 bit number can be added to the contents of the accumulator and the result is stored in the accumulator.
2) The contents of a register can be added to the contents of the accumulator and result is stored in the accumulator .
3) The contents of a memory location can be added to the contents of the accumulator and result is stored in accumulator.
this 1 byte instruction.
example – addb c it adds the content of accumulator to the content of the register b
2) SUB Any 8 bit data or the contents of a register or contents of a memory location can be subtracted from the contents of the accumulator.
with the subtraction instruction the following 3 operator can be done .
1) any 8 bit number can be subtracted from the contents of the accumulator . The result is stored in the accumulator.
In the table, R stands for register M stands for memory Mc stands for memory contents r.p. stands for register pair
Please Login to comment...