UCS617

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Roll Number:

Thapar Institute of Engineering & Technology, Patiala


Department of Computer Science and Engineering
MID SEMESTER EXAMINATION
B. E. (Third Year): Semester-VI (2022/23) Course Code: UCS617
(COE) Course Name: Microprocessor Based Systems Design
Date: March 17, 2023 Time: 3:30 PM — 5:30 PM
Duration: 2 Hours, M. Marks: 25 Name of Faculty: ANJ, MJU, ROS, AAS
Note: Attempt any five out of seven questions in a proper sequence with justification.
Assume missing data, if any, suitably.
Q1 Consider the following assembly language program run on an 8085 microprocessor having starting address from (6)
800011 where the content and data are in hexadecimal form.
S. No. Instruction
1. LXI H, 900AII
2. SPHL
3. LXI B, 498FH
4. PUSH B
5. MVI A, EFH
6. ADD C
7. PUSH PSW
8. POP D
9. RST 5
Answer the following questions with a suitable diagrammatic representation of the content inside registers and
memory locations:
(a) Calculate the size of the program in bytes.
(b) In which memory location of the stack the first byte will be stored?
(c) After the execution of line 6 (ADD C), what value will be stored inside the accumulator? Will the output of
this instruction affect the status of the flag register? If yes, then mention the name of the flag(s) and its
value.
(d) In which memory location(s) the instructions PUSH PSW will store the content? Also, mention the
name(s) of the registers from where the content is pushed.
(e) After the execution of this program, what content will be stored inside the accumulator and the program
counter and stack pointer will point to which memory address?
Q2 Design the timing diagram and also write the values at each machine cycle as below mentioned table for the (6)
following instruction:

7FFF H: MVI M, OFH (M: 3FFF H and Opcode for MVI M: 36H)

A0-A7 Do-D7 A8-Ais ALE 10 /M So, Si RD WR

Q3(a) Calculate the 16-bit count to be loaded in register DE to obtain the loop delay of two seconds in LOOP2. (5)
MVI B,1411
LOOP2: LX1 D.16-BIT
LOOP1: DCX D
MOV A,D
ORA E
JNZ LOOP1
DCR B
JNZ LOOP2
Ignore the execution time of the first instruction MVI B and assume the operating frequency of 8085 as 2 MHz.
Q3(b) Differentiate between Hardware and Software interrupts in 8085 microprocessor. (2)
Q4(a) The four segment registers contain the upper 16 bits of the starting addresses of the four memory segments of 64 (4)
KB each. Let the starting address of each segment in registers DS= 3032, CS=4042, SS=3860 and ES=7000.
Further each associated offset registers is BX = 3040H, SI = 200011, DI = 300011, IP = 058011, SP = 1735H and BP =
4826H. Find the Physical address/addresses, lower and upper range for each segment registers from where the
8086 accesses the data while executing the instructions.
Q4(b) Discuss the following pins for 8086 microprocessor: (2)
i. HOLD, HLDA ii. QS,,QS0

1/1

You might also like