You are on page 1of 3

# ARAB ACADEMY FOR SCIENCE AND TECHNOLOGY

COLLEGE OF ENGINEERING & TECHNOLOGY Department: Computer Engineering Lecturer: Dr. Hesham El Zouka Course: Microprocessors Systems Course Code: CC411 Date: 19 / 11 / 2009 Time Allowed: 1: 30 Hr.

Marks: 30

7th WEEK EXAM Attempt All Questions: Question No. 1: (10 marks)

1- Identify the addressing modes used for the source operands in the instructions that follow: abcdefgMOV AX , 0110H MOV DI, AX MOV CX , [DI] MOV AX, [BX]+10 MOV CL, AL MOV BX, [BX][DI]+0500H MOV AL, [BP]+0400H

2- Assume that DS = 4500, SS = 2000, BX = 2100, SI = 1486, DI = 8500, BP = 7814, and AX = 2512. Show the exact physical memory location where AX is stored in each of the following. Assume that all values are in hex. a. MOV [BX]+20, AX b. MOV [DI+BX+8] , AX c. MOV [BP] [SI] +10 , AX

MPC 6/1-1

Question No. 2:

(10 marks)

1. What is the value in the BX register after executing the following sequence of instructions? MOV BX, 1A1AH MOV AX, 2CDEH PUSH AX POP BX 2. If CS = 24F6H and IP = 634AH, show: Show the logical address Show the offset address. Calculate the physical address Calculate the lower range Calculate the upper range of the code segment

3. Show how the flag register is affected by the addition of 38H and 2FH.

4. If SP = 24FC, what is the offset address of the first location of the stack that is available to push data into?

5. If a processor has 24 address lines, what is the physical memory address space of this processor? Give the address of the first and last addressable memory locations in hex.

6. How does a pipeline allow you to execute one instruction per clock cycle? Give an example.

7. List all the 80x86 segment registers (those available on all processors). In which segment would you normally place your variables?

8. What are the data bus sizes of 8088 and 8086 processors?

## 10. List all of the 80x86 eight bit registers

MPC 6/1-2

Question No. 3:

(10 marks)

1. For each part, give the new contents of the 16-bit register (only if any part of the register changes). If an instruction is illegal, answer "illegal instruction". a) MOV AL,80H MOV BL,04H IMUL BL b) MOV AL,85H XOR AH,AH MOV BL,35H MUL BL c) MOV AX,39H ADD AL,39H AAA d) MOV AL,79H MOV BL,35H ADD AL,BL DAA e) STC MOV AX,203EH MOV BX,0743H ADC AX,BX NEG AX f) MOV AX,85H MOV BL,35H DIV BL

g) MOV DS , 2BCDH MOV AL, 3EFH IDIV DS 2. Write an assembly program that subtracts two numbers and stores the result in the accumulator.

Good Luck.
MPC 6/1-3