Saturday, 5 May 2012

8085 arithmetic instructions


1.ADD instruction-Addition instruction
ADD R; A=A+R
ADD M; A=A+[HL]
This instruction performs addition of content of specified register or memory location pointed by register pair HL and stores the result in accumulator
Ex: ADD B; A=A+B

2.ADI instruction- Add immediate data
ADI data
This instruction adds 8-bit “data” to accumulator and places the result in accumulator

3.SUB instruction – subtract
SUB R; A=A-R
SUB M; A=A-[HL]
This instruction subtracts content of register R or content of memory location pointed by HL register pair from accumulator and stores the result in accumulator.

4. SUI instruction- subtract immediate data
SUI data
this instruction subtracts 8-bit “data” from accumulator and stores the result in accumulator

5.INR instruction- increments 8-bit data
INR R; increments register R content by 1.
INR M; increments content of memory location pointed by HL register pair  by 1
This instruction operates on 8-bit data

6.DCR instruction- decrements 8-bit data
DCR R; decrements register R content by 1
DCR M; decrements content of memory location pointed by HL register pair by 1
This instruction operates on 8-bit data

7.INX instruction- increments 16-bit data
INX Rp; increments register pair Rp
INX B; increments register pair BC
INX D; increments register pair DE
INX H; increments register pair HL
INX SP; increments stack pointer SP by 1
This instruction increments 16-bit data by 1

8.DCX instruction- decrements 16-bit data
DCX Rp; decrements register pair Rp
DCX B; decrements register pair BC
DCX D; decrements register pair DE
DCX H; decrements register pair HL
DCX SP; decrements stack pointer SP by 1
This instruction decrements 16-bit data by 1

Back                                                Contents                                              Next

No comments:

Post a Comment