Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

GATE 2005 question for 8085 uP

Status
Not open for further replies.

electronist

New Member
Got this from a GATE paper of 2005
Im confused. any clue?


The following program starts at location 0100H
LXI SP, 00FF
LXI H, 0701
MVI A, 20H
SUB M

The content od accumulator when the program counter reaches 0109H is
(A) 20H (B)02H (C)00H (D)FFH

If in addition following code exists from 0109H onwards
ORI 40H
ADD M

what will be the result in the accumulator after the last instruction is executed?
(A)40H (B) 20H (C) 60H (D) 42H
 
You have to choose the right option from a, b, c, d

GATE is graduate aptitude test for engineers , an exam conducted in India for entrence to postgraduate courses
 
If you assume that the program is assembled with assembler as shown then the information is incomplete because
To execute the instruction SUB M at location 0108 you need the content of memory location 0701 pointed by [HL] to perform the operaion SUB M which is A = A-[HL]

Assuming that the data apears in memory as shown in the instructions which means
0100 LXI SP
0101 00
0102 FF
0103 LXI H
0104 07
0105 01
0106 MVI A
0107 20
0108 SUB M

if the memory content is as above then
The content od accumulator when the program counter reaches 0109H is
(A) 20H (B)02H (C)00H (D)FFH
the answer will be option C

If in addition following code exists from 0109H onwards
ORI 40H
ADD M

what will be the result in the accumulator after the last instruction is executed?
(A)40H (B) 20H (C) 60H (D) 42H
The answer is option C
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top