You are on page 1of 3

Philadelphia University

Student Name:

Faculty of Engineering

Student Number:

Course Title:
Course No:
Lecturer:

Dept. of Computer Engineering


First Exam, Second Semester: 2011/2012
Microprocessors
20/03/2012
Date:
0630313
Time Allowed: 1 Hour
Dr. Qadri Hamarsheh
No. Of Pages: 3

Information for Candidates


This examination paper contains 5 questions totaling 20 marks.
Advice to Candidates
1.
You should attempt ALL requested parts.
2.
You should write your answers clearly.
Basic notions: The aim of the questions in this part is to evaluate the required minimal student knowledge and skills.
Answers in the pass category represent the minimum understanding of basic concepts of IA-32 Processor Architecture,
Assembly Language Fundamentals: Instructions, Directives, Identifiers, Defining Data, Symbolic Constants, Data Transfers,
Addressing, and Arithmetic instructions.

Question 1 Multiple Choices


Identify the choice that best completes the statement or answers the question.

(8 marks)

1. An assembly language program is translated to machine code by


a) an assembler
c) a compiler
b) an interpreter
d) a linker
2. The 8086/8088 used two processing logical units which were known as:
a)
Segment and Offset Units
b)
Bus Interface Unit and Execution Unit
c)
Bus Unit and Execution Interface Unit
d)
ALU and Control Unit
3. Real-address mode can be used to access how much memory?
a) 1 megabyte
c) 2 megabytes
b) 1 gigabyte
d) 2 gigabytes
4. If CS = 0701H, SS = 0801H, SI = 0100H and IP = 0108H the address of the next instruction is:
a) 07090H
c) 07110H
b) 07811H
d) 07118H
5. The first processor that includes Virtual Memory in the Intel microprocessor family was:
a) 4004
c) Pentium Pro
b) 80286
d) 80486
6. Given the following array definition, which letter choice contains a valid constant declaration named
ArrayCount that automatically calculates the number of elements in the array?
newArray DWORD 10,20,30,40,50
a) ArrayCount = ($ - newArray) / 4
b) ArrayCount = ($ - newArray) / 2
c) ArrayCount = (newArray -$ ) / 4
d) ArrayCount = (newArray -$ ) / 2
7. Which of the following defines a constant Max?
a)
Max db 80
c)
mov Max, 80
b)
Max equ 80
d)
Max dw 80
8. Which of the following, when used in the data section of a MASM program, reserves 40 bytes of
RAM (memory)?
a) BYTE 20 DUP (2)
c) BYTE 20 DUP (20)
b) WORD 40 DUP (1)
d) WORD 20 DUP (2)
1

Question 2
Describe the typical uses for each of the following registers.
Register

(3 marks)

Typical Uses

EAX

EDX

ESP

ESI

EIP

EFLAGS

Familiar and Unfamiliar problems solving: the aim of the questions in this part is to evaluate that the student has some
basic knowledge of the key aspects of the lecture material and can attempt to solve familiar and unfamiliar problems of IA32 Processor Architecture, Assembly Language Fundamentals: Instructions, Directives, Identifiers, Defining Data, Symbolic
Constants, Data Transfers, Addressing, and Arithmetic instructions.

Question 3

(2 marks)

If the content of the register SS = 3500H and the content of the register SP= FFFEH, then
a) Calculate the physical address.
Solution

b) Calculate the lower range of the stack.


Solution

c) Calculate the upper range of the stack segment.


Solution

d) Show the logical address of the stack.


Solution

Question 4
Write assembly code to do the following
a) Declare a byte containing the value 64. Label the memory location var.
Solution

(2 marks)

b) Declare an unlabeled byte initialized to 10.


Solution
c) Declare 10 uninitialized bytes starting at the address label bytes.
Solution
d) Declare three 4-byte words of memory starting at; address Z, and initialized to 1, 2, and 3,
respectively.
Solution
Question 5

Write complete assembly program that computes the following equations (5 marks)
and

In your code:
Define the 2-byte signed integer variables J, K and L. (; Initialize J to 3 and K to -2)
Define the 2-byte unsigned integer variables U1, U2 and U3. (; Initialize U1 to 254 and
U2 to 22)
DS must point to the segment address.
Solution

Good Luck
3

You might also like