8085 Microprocessor

7 Instruction Set contd....

2) Arithmatic instructions:

The instructions of this group perform arithmetic operations such as addition, subtraction; increment or decrement of the content of a register or memory.

Examples:

1). ADD r. (Add register to accumulator) [A] <-- [A] + [r].

2) .ADD M. (Add memory to accumulator) [A] <-- [A] + [[H-L]].

3).ADC r. (Add register with carry to accumulator). [A] <-- [A] + [r] + [CS].

4). ADC M. (Add memory with carry to accumulator) [A] <-- [A] + [[H-L]] [CS].

5) .ADI data (Add immediate data to accumulator) [A] <-- [A] + data.

6) .ACI data (Add with carry immediate data to accumulator). [A] <-- [A] + data + [CS].

7).DAD rp. (Add register paid to H-L pair). [H-L] <-- [H-L] + [rp].

8).SUB r. (Subtract register from accumulator). [A] <-- [A] – [r].

9).SUB M. (Subtract memory from accumulator). [A] <-- [A] – [[H-L]].

10).SBB r. (Subtract register from accumulator with borrow). [A] <-- [A] – [r] – [CS].

11).SBB M. (Subtract memory from accumulator with borrow). [A] <-- [A] – [[H-L]] – [CS].

12).SUI data. (Subtract immediate data from accumulator) [A] <-- [A] – data.

13).SBI data. (Subtract immediate data from accumulator with borrow). [A] <-- [A] – data – [CS].

14).INR r (Increment register content) [r] <-- [r] +1.

15). INR M. (Increment memory content) [[H-L]] <-- [[H-L]] + 1.

16).DCR r. (Decrement register content). [r] <-- [r] – 1.

17).DCR M. (Decrement memory content) [[H-L]] <-- [[H-L]] – 1.

18).INX rp. (Increment register pair) [rp] <-- [rp] – 1.

19).DCX rp (Decrement register pair) [rp] <-- [rp] -1.

20).DAA (Decimal adjust accumulator) .

 

 

 

 

 

 

3) Logical instructions:

The Instructions under this group perform logical operation such as AND, OR, compare, rotate etc.

Examples:

1). ANA r. (AND register with accumulator) [A] <-- [A] ^ [r].

2).ANA M. (AND memory with accumulator). [A] <-- [A] ^ [[H-L]].

3).ANI data. (AND immediate data with accumulator) [A] <-- [A] ^ data.

4).ORA r. (OR register with accumulator) [A] <-- [A] v [r].

5).ORA M. (OR memory with accumulator) [A] <-- [A] v [[H-L]]

6).ORI data. (OR immediate data with accumulator) [A] <-- [A] v data.

7).XRA r. (EXCLUSIVE – OR register with accumulator) [A] <-- [A] v   [r]

8).XRA M. (EXCLUSIVE-OR memory with accumulator) [A] <-- [A] v  [[H-L]]

9).XRI data. (EXCLUSIVE-OR immediate data with accumulator) [A] <-- [A]

10).CMA. (Complement the accumulator) [A] <-- [A]

11).CMC. (Complement the carry status) [CS] <-- [CS]

12).STC. (Set carry status) [CS] <-- 1.

13).CMP r. (Compare register with accumulator) [A] – [r]

14).CMP M. (Compare memory with accumulator) [A] – [[H-L]]

15)CPI data. (Compare immediate data with accumulator) [A] – data.

The 2nd byte of the instruction is data, and it is subtracted from the content of the accumulator. The status flags are set according to the result of subtraction. But the result is discarded. The content of the accumulator remains unchanged.