- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- 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.
Mnemonics | Description |
---|---|
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.
Mnemonics | Description |
---|---|
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 |
Advertisements