answersLogoWhite

0

MVI A,0

ADI 1

MVI A,0

The first MVI only clears the accumulator. The ADI adds one to it, clearing the N, Z, O, C, and P flags. The second MVI clears the accumulator again.

It is possible that I have the sense of the P flag backwards. If so, replace the first MVI with MVI A,2 and the P flag will be correct.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Which instruction is used to clear accumulator if content is already there in that accumulator?

To clear only Accumulator & not the Flag Register, you can use: 1) ANI 00 H 2) MVI A, 00 H To clear both Accumulator as well as Flag Register, use: LXI H, 0000 H PUSH H POP A.


What is xra in 8085 microprocesssors?

Exclusive OR with Accumulator. The results are then placed in the accumulator.


Write three different methods to clear Accumulator?

To clear an Accumulator in programming, you can use the following methods: Reset to Zero: Simply assign the Accumulator variable to zero (e.g., accumulator = 0;), which effectively clears its value. Re-initialize: If the Accumulator is part of a data structure or object, re-initialize the entire structure or object to its default state, which will also clear the Accumulator. Use a Clear Method: If the programming language or framework provides a specific method to clear or reset the Accumulator, call that method (e.g., accumulator.clear()), which is often designed to handle additional cleanup tasks.


Four Ways to clear accumulator of 8085?

The four ways to clear the accumulator in the 8085 are...XRA AMVI A,0SUB ALDA {address of a zero}Answered By:KUNAL SINHARead more: What_are_the_4_ways_to_clear_the_accumulator_in_8085_microprocessors


Assembly language pgm to find sum of n numbers?

C100 LXI H C200 21 ; Load the HL register pair immediately C101 00 ; C102 C2 ; C103 MOV B M 46 ; Move the memory content (Total number of data) in to B register C104 MVI C 00 0E ; Initialize the C register with 00 H C 105 00 ; C106 SUB A 97 ; Clear the ac cumulator C107 INX H 23 ; Increment the HL register pair (to get the next input data) C108 MOV A M 7E ; Move the memory content in to accumulator C109 DCR B 05 ; Decrement the B register c o n tent C10A INX H 23 ; Increment the HL register pair C10B ADD M 86 ; Add the memory content to accumulator C10C JNC C110 D2 ; Jump if carry = 0, to C110 H C10D 10 ; C10E C1 ; C10F INR C 0C ; Increment the C register content C110 DCR B 05 ; Decrement the B register content C111 JNZ C10A C2 ; Jump if no zero to C10A H C112 0A ; C113 C1 ; C114 STA C300 32 ; Store the accumulator content (sum) at C300 H C115 00 ; C116 C3 ; C117 MOV A C 79 ; Move the C register content to accumulator C118 STA C301 32 ; Store the accumulator content ( carry ) at C300 H C119 01 ; C11A C3 ; C11B HL T 76 ; Halt the exection


What are the 4 ways to clear the accumulator in 8085 microprocessors?

I think its SUB or SUI (subtract contents from accumulator) You could just do, mvi a, 00h


Is Tbilisi Medical Teaching University Hippocrates approved by WHO and MCI?

Looking at the information available, it is not clear that it is recognized. However, the best thing to do would be to write to the WHO and MCI and ask them specifically before you register with the University.


How do you clear a write only disk?

you can clear the data from a write only disc by formatting the disc


When ANI F instruction is used in microprocessor?

The ANI F instruction causes the assembler to look in the symbol table for the symbol F, and to build an instruction that ANDs immediate that value with the accumulator. If you meant to say ANI 0FH, that means to clear the high 4 order bits of the accumulator and to retain the low 4 order bits.


Why was voting rights act successful?

It was successful since the goal was clear (to register large numbers of African-American voters), its implementation was straightforward (sending out people to register them), and the authority of implementors was clear (they had the support of the attourney general and even U.S marshalls) and concentrated in the Justice Department


Can you sell a car knowing the other person can not register?

As long as you have clear title can sell to anyone. Whether they can drive it or not or what they do after is on them.


What is the clear explanation of standard form?

Write it out as written