MT Solution 28feb25
MT Solution 28feb25
Page 1 of 7
Enrolment No: ________________________
The data from the Accumulator can be sent to peripheral devices like
LEDs, motors, or any other output-controlled devices connected to the
I/O ports.
Q:2 Write an 8085 ALP to count the no. of byte that are greater than 2510 and lesser [04]
than 6510 from an array of twenty bytes stored on memory location 2000h
onwards, store such no. on memory location 2100H onwards.
LXI H, 2000H
LXI D,2100H
MVI C, 14H (20 DECIMAL)
MVI B, 00H
X12: MOV A,M
CPI 19H (25 DECIMAL)
JC X11
CPI 41H (65 DECIMAL)
JNC X11
INR B
STAX D
INX D
X11: INX H
DCR C
JNZ X12
HLT
OR
Following program displays 1-9 on an output port at a certain delay. Answer
the below questions
Page 2 of 7
Enrolment No: ________________________
a. What is the status of the flags and the contents of the accumulator after
the execution of the POP instruction located at 2007H?
Accumulator: 00H and Flag register: 00H ½ MARKS
b. Specify the stack locations and their contents after the execution of the
CALL instruction (not the Call subroutine).
STACK LOCATION: 20FEH & CONTENT OF 20FE: 0EH ½ MARKS
c. What are the contents of the stack pointer register and the program
counter after the execution of the CALL instruction?
SP:20FE & PC:2064 ½ MARKS
d. Specify the memory location where the program returns after the
subroutine
Program Returns To 200E Memory location ½ MARKS
e. What changes are needed so that the program functions correctly.
(display 1-9 on output port)
ADD instruction POP PSW before RETURN.
Change PUSH H instruction to PUSH PSW in the delay subroutine
Add JNZ 200B instruction before HLT in main program 2 MARKS
Q:3 Design an 8085-microprocessor system such that it should contain 16KByte of [04]
EPROM and 4KByte of RAM with starting addresses 0000H and 4000H
respectively. Use two 8KByte of EPROMs (2764) and two 2KByte of RAMs
(6116) for this system. Use 3 input and 5 input NAND gates for chip select logic.
Memory Requirements:
- 16KB EPROM starting at address 0000H:- Two 8KB EPROMs (2764)
- 4KB RAM starting at address 4000H: Two 2KB RAMs (6116)
Memory Map:
0000H-1FFFH: EPROM1 (8KB)
2000H-3FFFH: EPROM2 (8KB)
4000H-47FFH: RAM1 (2KB)
4800H-4FFFH: RAM2 (2KB)
Page 3 of 7
Enrolment No: ________________________
2 Marks
Page 4 of 7
Enrolment No: ________________________
Circuit Connections:
1. Connect 8085's address bus (A0-A15) to appropriate pins of memory chips
2. Connect 8085's data bus (D0-D7) to all memory chips
3. Connect control signals (RD, WR) to appropriate memory chip pins
4. Implement the chip select logic using NAND gates as specified above
5. Connect the outputs of NAND gates to respective CS pins of memory chips
Page 5 of 7
Enrolment No: ________________________
2) Identify the bytes from the following set that will be displayed at memory
location 2000H, assuming one byte is loaded into accumulator at a time.
Data(H): 43, 25, 7B, 78, F2, D7
MVI A, Data
MVI B,44H
MVI C, B8H
CMP C
JC Loop
STA 2000H
HLT
Loop: SUB A
STA 2000H
HLT
2) Draw 8085 timing diagram for execution of the instruction MVI A,32H
4) Calculate the delay in the following loop, assuming the system clock
period is 0.33 µS.
LXI B,12FFh
Page 6 of 7
Enrolment No: ________________________
Delay: DCX B 6T
MOV A,C 4T
ORA B 4T
JNZ Delay 10T/7T
Page 7 of 7