**1. Problem –** Write the 8085 instructions which reset the accumulator.

**Solution –** There are 4 instructions to reset the accumulator in 8085. These instructions are:

S.No. | MNEMONICS | COMMENT |
---|---|---|

1 | MVI A, 00 | A <- 00 |

2 | ANI 00 | A AND 00 |

3 | XRA A | A XOR A |

4 | SUB A | A <- A – A |

**Explanation –**

**MVI A, 00:**instruction copies 00 to A.**ANI 00:**instruction performs bit by bit AND operation of source operand (i.e. 00) to the destination operand (i.e. the accumulator A) and store the result in accumulator A.**XRA A:**instruction performs XOR operation between source operand and destination operand and store the result in the accumulator. Here, source and destination operand both are same i.e. A. Therefore, the result after performing XOR operation, stored in the accumulator is 00.**SUB A:**operation subtracts the contents of source operand(here, source register is A) from the contents of accumulator and store the result in the accumulator itself. Since, the source and destination operand are same. Therefore, accumulator A = 00.

**2. Problem –** Write 8086 instructions which are used to reset accumulator.

**Solution –** There are 4 instructions in 8086 to reset the accumulator. These instructions are:

S.No. | MNEMONICS | COMMENT |
---|---|---|

1 | MOV AX, 0000 | AX <- 0000 |

2 | AND AX, 0000 | AX <- AX AND 0000 |

3 | XOR AX, AX | AX <- AX XOR AX |

4 | SUB AX, AX | AX <- AX – AX |

**Explanation –** Register AX is used.

**MOV AX, 0000:**copies 0000 to AX.**AND AX, 0000:**operation performs bit by bit ANDs the source operand (0000) to the destination operand and store the result in AX.**XOR AX, AX:**performs the XOR operation in values of source register and destination register and store the result in AX. The source and destination operands, both are same. Therefore, AX = 0.**SUB AX, AX:**operation subtracts the value of source operand from the value of destination operand and store the result in AX. Here, both the operands are same .Therefore, AX = 0.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

## Recommended Posts:

- Differences between 8085 and 8086 microprocessor
- 8085 program to find the set bit of accumulator
- Flag register of 8086 microprocessor
- General purpose registers in 8086 microprocessor
- Arithmetic instructions in 8086 microprocessor
- Logical instructions in 8086 microprocessor
- Data transfer instructions in 8086 microprocessor
- Process control instructions in 8086 microprocessor
- Memory Segmentation in 8086 Microprocessor
- Addressing modes in 8086 microprocessor
- String manipulation instructions in 8086 microprocessor
- Program execution transfer instructions in 8086 microprocessor
- Pin diagram of 8086 microprocessor
- Interrupts in 8086 microprocessor
- Bus Cycles of 8086 Microprocessor
- Introduction of Single Accumulator based CPU organization
- Interrupts in 8085 microprocessor
- Addressing modes in 8085 microprocessor
- Registers of 8085 microprocessor
- Flag register in 8085 microprocessor

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.