Exam Questions Papers - Engineering

Q1:

Consider the following program segment written for 8085 based system
LXI SP, FFFFH
MVI A, FFH
MOV BB, A
K: DCR B
PUSH HL
JNZ K
INR A
LXI H, FFCEH
CPI 20H
LHLD

The contents of accumulator is :

A CE

B 20

C indeterminate

D none of these

ANS:C - indeterminate

Since contents of HL register pair are unknown and are continuously ''PUSH''ed on the stack; retrieval of the same will result in ''Indeterminate'' data.