- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Reset Accumulator (8085 & 8086 microprocessor)
In this section we will see how to reset the accumulator content in Intel 8085 and 8086 microprocessors.
In both of the microprocessors, there are four instructions to do the work. These instructions are doing the same in both cases.
Let us see the 8085 instructions first to reset the Accumulator.
|MVI A,00H||This instruction loads 00H into the accumulator. This is two-byte instruction.|
|ANI 00H||This instruction performs AND operation between accumulator and 00H. This is also a two-byte instruction.|
|XRA A||This one-byte instruction is performing the XOR operation with accumulator itself.|
|SUB A||SUB A is another one-byte instruction. It subtracts accumulator value from the accumulator.|
The XRA A and SUB A both are one-byte instruction, but as XRA A is logical, it performs faster than the other. So XRA A is best for clearing/resetting Accumulator content than other three instructions.
Now let us see how to reset accumulator in 8086 microprocessor.
|MOV AX, 0000||This instruction loads 0000H into the accumulator.|
|AND AX, 0000||This instruction performs AND operation between accumulator and 0000H.|
|XOR AX, AX||Here we are performing XOR operation on AX and AX. The source and destination both are set to AX.|
|SUB AX, AX||Here also the source and destination is AX and AX. This instruction subtracts AX value from AX itself to make it 0000H|
- Differences between 8085 and 8086 microprocessor
- Instruction to complement Accumulator in 8085 Microprocessor
- Instructions to rotate Accumulator in 8085 Microprocessor
- Accumulator or Register A in 8085 Microprocessor
- Pin diagram of 8086 microprocessor
- Flag register of 8086 microprocessor
- Addressing modes in 8086 microprocessor
- Arithmetic instructions in 8086 microprocessor
- Logical instructions in 8086 microprocessor
- Microprocessor 8085 Architecture
- General purpose registers in 8086 microprocessor
- Data transfer instructions in 8086 microprocessor
- Process control instructions in 8086 microprocessor
- String manipulation instructions in 8086 microprocessor
- 8085 program to find the set bit of accumulator