Você está na página 1de 6

University of Sharjah

College of Engineering

Department of Computer Engineering

0403332 Microprocessors & Interfacing

Fall 2001 Semester

Examination 1

Student ID

Question 1 20
Question 2 40
Question 3 40
Total 100

• Time allowed: 50 minutes

• This is a OPEN BOOK, CLOSED NOTES examination.

• Attempt ALL questions.

• The exam paper consists of 6 pages.

• Candidates are NOT permitted to use calculators in this examination.

• If you have questions, ask only the instructor of your course.

• Answer in the space provided.

• DO NOT write your name anywhere on the exam sheet.


Question 1. (20 points)
Answer True or False for each of the following statements (2 points each)

1. all the instructions


that the microprocessor can understand. T F

2. Only one device can be connected to a unidirectional bus. T F

3. Assembly Language is a symbolic representation of Machine


Language. T F

4. Memory stores information in Hexadecimal format. T F

5. All registers in the 8085 are 8-bits T F

6. Data Transfer operations do not update the flags register. T F

7. A 2 MegaByte memory chip has 21 data pins. T F

8. The instruation LDAX D loads the DE register pair with the contents
of the memory location pointed to by the HL register pair. T F

9. It is possible to have F130H as the first address of a 1K memory


chip. T F

10. This class is fun Yes Yes

2
Question 2. (30 points)
An existing memory system has the memory map shown in Figure 1. Using only the following
chips, design the circuit needed to fill in the holes.

Chip Type Count 0000H


8 K Byte RAM chip 2 16 K
74138 Decoder 1 EPROM
2-input AND gate 4
Inverter 4

8K
RAM1
8K
RAM2 9FFFH

16 K
RAM 3
FFFFH

Figure 1

2.1. Determine the starting and ending addresses for each of the new memory chips.
(15 Points)

3
2.2. Determine the combinations needed for the chip select of the new memory chips.
(6 Points)

2.3. Draw the circuit. (9 Points)


(Only show the 74138 and its connections. No need to draw the memory chips.)

4
Question 3. (10 points)
Determine the memory map for the memory system shown in Figure 2.

A15
A14

G G2A G2B
1
A MSB
13
O6
A12

O2

74138
A11 A11
CE CE

4K 4K
RAM 1 RAM 2

A0 A0

Figure 2.

5
Question 4 (40 Points)
4.1 Given the memory contents shown below, execute the following program and show
the contents of the registers and the state of the flags after each instruction.
(20 Points)

4000 3F
4001 B3
4002 16
4003 24

ORG 2000H A B C H L Z S CY
LDA 4000H
LXI H 3F01H
INR H
MOV B M
XRA B
DCX H
DCX H
MVI C 21H
ADD C
CMA

4.2 Memory locations 4000H and 4001H have some data. Write a program to read the
data from location 4000H, switch the upper and lower nibbles (for example, 3A
becomes A3), then compare the result with the contents of location 4001H. If they are
equal, store the result of the switching in location 4002H. Otherwise, store 00H in
4002H. (20 Points)

Você também pode gostar