KEMBAR78
Microprocessor and Interfacing Exam 2012 | PDF | Computer Architecture | Digital Electronics
0% found this document useful (0 votes)
73 views2 pages

Microprocessor and Interfacing Exam 2012

The document is an exam paper for the EE334 course at the University of Tripoli, focusing on Electrical and Electronic Engineering. It contains various questions related to assembly language programming, 8086 microprocessor operations, and interfacing with hardware components. Topics include logical and physical addresses, interrupt handling, assembly instructions, and interfacing with peripheral devices.

Uploaded by

tarboo3644
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views2 pages

Microprocessor and Interfacing Exam 2012

The document is an exam paper for the EE334 course at the University of Tripoli, focusing on Electrical and Electronic Engineering. It contains various questions related to assembly language programming, 8086 microprocessor operations, and interfacing with hardware components. Topics include logical and physical addresses, interrupt handling, assembly instructions, and interfacing with peripheral devices.

Uploaded by

tarboo3644
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

University of Tripoli faculty of engineering Electrical & Electronic Eng. Dept.

Course: EE334 FINAL SUMMER 2012

1- Determine the logical address plus the physical address accessed by each of the following instructions
using the information below:
1) MOV BX , [SI] 2) XOR BP, ES:LIST[DI][BX]
3) SUB DS, [SI+60H] 4) RCL ARRAY[DI] , CL
Note : CS= 0100H , DS=B0C0H , ES= 9A00H , SI = 15H , DI= AF01H, LIST= 50FFH,
ARRAY=1000H
2- Write a sequence of instructions that will load the offset address of variable ‘X’ where X=1234H into
Instruction Pointer (IP)?
3- What is the function of Bus Interface Unit (BIU) and Execution Unit (EU)?
4- Briefly describe fetch cycle and execute cycle ?
5- How can you detect the sign of the any number stored at 16-bit register ? “ don’t use any arithmetic
instructions”.
6- Write the instructions required to solve the following equation:
0.125(AL + BL)(CL - CH)
7- While handling the interrupt instructions in 8086. What are the internal operations
may be carried out by the stack?
8- Write about the following instruction : Call WORD PTR [BX] ?
9- When the 8086 processor is in minimum mode?
10- Write any three differences between 8086 and 8088?
11- The following subroutine adds ax to bx and returns the answer in ax. However, there is a
functional problem with this subroutine, what is it?
Mysub Proc near
Push cx
Push dx
Add ax , bx
Pop dx
Ret
Mysub endp
=====================================================================
Q2 ) A- Assume the following register and memory contents, all values in hex.
CS: 0BC5, DS: 0BC4 SS: 0BC6, AX = 8391 BX :0028 , CX = 9040 DX = 85A3 BP: 0051, SP= 005E

What is value of the affected register after each of the following memory read? Give all values in hex.
a. mov ax, [bx +4] b. mov cx, [bp - 2] c. mov ax, bx
d. If AX = 02FE , BX = 0A05 what is the value of AX after the following operation? imul bl
e. If AX = FFF1 , BX = 00FD, what is the value of AX after the following operation idiv bl
f. For the following instruction “div cl “ , provide values for AX, CX that will cause divide overflow.
g. Write an instruction sequence that will add the perform the 32-bit addition:
AX:BX = AX:BX + CX:DX
where AX:BX is one 32-bit number and CX:DX is another 32 bit number. You can only use 16-bit
registers and operations.
B- Write a subroutine that will return the maximum 16-bit SIGNED integer from an array of
integers. On subroutine entry, register SI will point to the start of the array (each element is 16 bits), and
register CX will have the number of integers in the array. The maximum value should be returned in the
AX register. An example call to this procedure is shown below:
University of Tripoli faculty of engineering Electrical & Electronic Eng. Dept.
Course: EE334 FINAL SUMMER 2012

Q3 ) a- write an assembly program in the form of procedures Using DOS interrupt (INT21h) that performs
the following sub-procedures :
- Read three decimal digits via keyboard continuously .
- Display the string ''code has detected and lock has switched ON'' for 15secands, only If the
entered decimal digits are equal (03-06-09h),Otherwise stop reading numbers after five
attempts and display the following string “try again after 5 minute”.
Assume a system frequency equal 5MHZ.

b- Draw the block diagram of the fully buffered 8086 microprocessor

c- Draw a system bus timing diagram required to execute the following instructions by the microprocessor
8088: Test BL, [DI]
NEG byte ptr [SI]
d- Show how a 32Kbyte ROM module can be connected on an 8088 system using 2764 EPROM (4KB) chips,
occupying the address range starting from the address E0000H. Use the following address decoding circuits:
- NAND decoding circuits.
- A line decoder and a NAND gate
=========================================================
Q4 )a - If the interrupt service routine(ISR) of the interrupt source (INT 40H) has located at a logical
address (B500:EF08H). Write the instruction required to initialize the interrupt vector table in order
to handle this interrupt?
B- The external interrupt source (NMI) has connected to the output of infra- red link. Whenever any person has
cut this link, NMI has activated.
Write assembly program that count the number of person passing through this link , once the number of
persons exceeded over 500h an alarm message “the section is full” the will display on screen and
cleared every 2secnd in the center of the screen ?

======================================================================
Q5 ) a- Configure the ports of 8255 (PPI) as follows: port A=input, port B=output, port , CU=output, port CL=input,Assume that the
8255 PPI is located at 300H ?
b- Given the 8255 connection to the stepper motor of Figure below, write a down the required code in an assembly language
to rotate it continuously.

- the stepper motor rotate in both direction based on


a state of switch (A )
- press any key on the keyboard to stop it.

Note: stepper speed is 1 cycle per minute .

**************************************GOOOOOOOD LUCK **********************************************

You might also like