Professional Documents
Culture Documents
King Khalid University: - Final Exam / 2°d Semester, 1435/1436
King Khalid University: - Final Exam / 2°d Semester, 1435/1436
4. The contents of accumulator are copied into the I/O port 78H equivalent to
5. An is a concept that refers to a point of interaction between components, and is applicable at the level
of both hardware and software.
2. Number of the times the instruction sequence below will loop before coming out of loop is
MOV AL, 00h
Al: INC AL
JNZ Al
a) 00 b) 01 c) 255 d) 256
3. Check the contents of AL and six condition flags if register AL = 7Fh and the instruction ADD AL,1 is executed ?
1/4
4. What is the output of the following code
SI=10010011 10101101, CY=0
SHR SI, 1
a) 93ADH, CY=1, PF=1 b) 49D6H, CY=1, PF=1 c) 4D6CH, CY=1, PF=1 d) D1CCH, CY=1, PF=1
1. Draw the schematic diagram of the Arithmetic and Logic Unit (ALU) of the 8085 microprocessor.
2. Explain the functions of the Bus Interface Unit (BIU) of the 8086 microprocessor.
3. Complete and explain the 8086 timing diagram for writing data to memory
CLK
ADDRESS
ADDRESS/DATA -
WR
4. State the different addressing mode for the 8086 microprocessor and give an example for the Direct addressing mode
and Register indirect addressing mode.
5. Assume that DS=10CFH, SS=1F49H, BX=2100H and BP=7000H. Show the exact physical memory location where
AX is stored in each of the following:
a) MOV [BX+12],AX
b) MOV [BP+13],AX
Question IV: Explain in detail [4 x 5=20 Marks]
2/4
3. Assuming that SP=8056H, AX=149FH, BX=1DE5H, and CX=410EH show the contents of the stack as each of the
following instructions is executed:
PUSH AX
PUSH BX
PUSH CX
SS:8056H FE FE FE FE
SS:8055H
SS:8054H
SS:8053H
SS:8052H
SS:8051H
SS:8050H
4. Write an Assembly Language Program that adds four words of data and saves the result. The values will be 234DH,
1DE6H, 3BC7H, and 566AH. Verify that the sum is D364.
Question V: Application/Problem solving [1 x 5=5 Marks]
1. In order to verify the status of eight switches numbered from 0 to 7 connected to the parallel PORT of the PC as
shown in Figure 1, their status is continually tested. '1' indicates that the switch is ON, '0' indicates that the switch
is OFF. We assume that only one switch can change state at a time.
In this exercise it is proposed to determine the number of the switch set to 1. For example, if the switches combination
is "00100000", the number will be 5.
vcc
854 2
10K
110 To the microprocessor
Toggle switches parallel PORT
U1
MI= 1A1 1Y1 18 D
1111111==1 1A2 1Y2 1 a
tcJ 1A3 1Y3 t
IMMIC=ZI 1A4 1Y4 1 a
11•111= 2A1 2Y1
2A2 2Y2 13
2A3 2Y3 u
2A4 2Y4 s
1G
• 2G
74ALS244
SEL
Figure 1.
3/4
,4