Arithmetic Instructions in 8085

Arithmetic instructions perform various arithmetic operations such as addition, subtraction, increment, and decrement.

Commonly used arithmetic operations are:

  • Add
  • Subtract
  • Increment
  • Decrement

The complete list of arithmetic instructions in 8085 is described in the following table.

MnemonicDescriptionExample
ADD R1-byte instruction
Adds the contents of register R to the contents of the accumulator.
ADD B
ADI 8-bit2-byte instruction
Adds the second byte to the contents of the accumulator.
ADI 57H
ADD MAdds the content of memory to A; the address of memory is in HL register.ADD M
SUB R1-byte instruction
Subtracts the contents of register R from the contents of the accumulator.
SUB B
SUI 8-bit2-byte instruction
Subtract the second byte from the contents of the accumulator.
SUI 34H
SUB MSubtracts the content of memory from A; the address of memory is in HL register.SUB M
INR R1-byte instruction
Increases the contents of register R by 1
Caution: All flags except the CY are affected.
INR D
INR MIncrements the content of memory the address of which is in HL register.INR M
DCR R1-byte instruction
Decreases the contents of register R by 1
Caution: All flags except the CY are affected
DCR B
DCR MDecrements the content of memory the address of which is in HL register.DCR M
INX RpIncrements the content of the register pair.INX H
DCX RpDecrements the content of the register pair.DCX B

All instructions except INR and DCR,

  • Assume that the accumulator is one of the operands.
  • Modifies all the flags according to the data conditions of the result.
  • Place the result in the accumulator.
  • Do not affect the contents of the operand register.

The INR and DCR instructions affect the contents of the specified register and all flags except the CY flag.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments