Last Updated : 19 Nov, 2018

Consider the following Assembly language program

MVIA   30 H
ACI    30 H
XRA    A
POP    H

After the execution of the above program, the contents of the accumulator will be
(A) 30 H
(B) 60 H
(C) 00 H
(D) contents of stack


Answer: (C)

Explanation: MVI: – move immediate data to a register or memory location.
ACI: – Add immediate to accumulator with carry.
XRA: – The content of accumulator are exclusive OR with specified register or memory location.

So after first instruction execution, Accumulator value will be A = 30H = 0011 0000
After second Instruction A = 30 + 30 = 0110 0000
After third Instruction A = A⊕A = 0110 0000 ⊕ 0110 0000 = 0000 0000 = 00H

So, Correct option is (C)

Quiz of this Question


Share your thoughts in the comments