Gate
Exam
Numerical Ability
For 8085 microprocessor, the following program is executed.
MVI A, 05H;
MVI B, 05H;
PTR: ADD B;
DCR B;
JNZ PTR;
ADI 03H;
HLT;
At the end of program, accumulator contains
(A) 17H (B) 20H (C) 23H (D) 05H
Read Solution (Total 2)
-
- A=05H B= 05H, A+B=10H
NOW A=AH,B=4H then A+B=EH=A
A=EH,B=03H then A+B=11H=A
A=17H,B=02H then A+B=13H=A
A=19H,B=01H then A+B=14H=A
ADI 03H is A+03H=14H+03H=17H so option(A) - 7 years agoHelpfull: Yes(2) No(0)
- A=05H B= 05H, A+B=10H
NOW A=10H,B=4H then A+B=14H=A
A=14H,B=03H then A+B=17H=A
A=17H,B=02H then A+B=19H=A
A=19H,B=01H then A+B=20H=A
ADI 03H is A+03H=20H+03H=23H so option(C) - 8 years agoHelpfull: Yes(0) No(2)
Gate Other Question