Loading...

Loading, please wait...

ExamDost Practice Questions

Practice over 1000+ GATE-level questions from this topic!

Designed to match the latest GATE pattern with topic-wise precision, difficulty tagging, and detailed solutions.

Q#1 Microprocessor GATE EE 2011 MCQ +2 marks -0.66 marks

A portion of the main program to call a subroutine SUB in an 8085 environment is given below.

                :

                :

              LXI        D, DISP
        LP. CALL        SUB
                :

                :

It is desired that control be returned to LP + DISP + 3 when the RET instruction is executed in thee subroutine. The set of instructions that precede the RET instruction in the subroutine are

Explanation:

When CALL instruction is executed the address of LP is pushed to the top of stack and then the PC is fed with new address. To return the execution to LP + DISP + 3.

The address of LP must be extracted in HL register pair by means of POP instruction and then DISP is added to it by the use of DAD instruction so that HL = LP +DISP

Then HL register pair is incremented thrice to obtain HL = LP +DISP + 3

Then this is pushed back to the top of stack to be fed to Program Counter upon execution of RET instruction.

Browse Practice Questions by Chapters / Topics in Browse Practice Questions by Chapters / Topics in GATE Electrical Engineering
Total Questions

Attempted

% Attempted

Correct

% Correct

Topic Questions Attempted Correct
Network Analysis 208 0 0
Signals and Systems 21 0 0
Control Systems 18 0 0
Analog Electronics 10 0 0
Digital Electronics 138 0 0
Electrical Machines 17 0 0
Power Electronics 17 0 0
Power Systems 18 0 0
EMFT EE 8 0 0
Measurement 6 0 0
Engineering Mathematics 27 0 0
General Aptitude 104 0 0