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 1995 MCQ +2 marks -0 marks

A subroutine PROG1 written in the 8085 assembly language is given below. At entry to this program, the values of different registers in HEX are. A=05; BC=0000; DE=5472; HL=4528, All the flags are set to 1. Determine the register contents and condition of the zero and carry flags after the execution of the program. (i.e., after executing RET statement). What does the program accomplish?

PROG1        MOV A, E

        ADD L

        DAA

        MOV L, A

        MOV A, D

        ADC H

        DAA

        MOV H, A

        MVI A, 00H

        RAL

        RET

Contents of Registers,

HL = 0000H

BC = 0000H

DE = 5472H

A = 01H

CY = 0 and Z =1

Contents of Registers,

HL = 000H

BC = 0000H

DE = 5472H

A = 01H

CY = 1 and Z =0

Contents of Registers,

HL = 0000H

BC = 0000H

DE = 5472H

A = 10H

CY = 0 and Z =1

Contents of Registers,

HL = 0000H

BC = 0000H

DE = 5472H

A = 01H

CY = 1 and Z =1

Explanation:

PROG1                  MOV A, E;      A = 72H, flags unchanged

ADD L;   A = A + L = 9AH (1001 1010);  Z = 0, CY = 0

DAA;

Since, the lower nibble of accumulator is greater than 09H then 06H is added to lower nibble which makes the result A0H. Now the higher order nibble becomes greater than 09H so 06H is added to higher order nibble. Hence, A = 00H. So Carry Flag is set and zero flag is also set.

Contents of Registers,

HL = 0000H

BC = 0000H

DE = 5472H

A = 01H

CY = 0 and Z =1

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