Docsity

4 Problems on Microprocessors - Exam 1 | COMPE 475, Exams of Engineering

Toggle sidebar
bg1
CompE475 Midterm Exam # 1
Dated: October 16, 2003 Page : 1 of 3
Problem # 1 Miscellaneous (30 marks)
a) Convert the following numbers into signed binary words (16-bit) (5 points)
i) +800
ii) -3212
b) Convert the following decimal numbers into floating point single precision format (5 points)
i) -10.625
ii) +100.25
c) Write down the names (no abbreviations) of six general purpose registers in Intel family of
microprocessors. Also name six flag registers. (5 points)
d) What is the purpose of segment registers in protected mode memory addressing? (3 points)
e) Code an 80286 descriptor that describes a protected mode memory segment that begins at location
210000H and ends at location 2100FFH. This memory segment is a code segment which can be read.
(5 points)
pf3

Partial preview of the text

Download 4 Problems on Microprocessors - Exam 1 | COMPE 475 and more Exams Engineering in PDF only on Docsity!

Problem # 1 Miscellaneous (30 marks)

a) Convert the following numbers into signed binary words (16-bit) (5 points)

i) + ii) -

b) Convert the following decimal numbers into floating point single precision format (5 points) i) -10. ii) +100.

c) Write down the names (no abbreviations) of six general purpose registers in Intel family of microprocessors. Also name six flag registers. (5 points)

d) What is the purpose of segment registers in protected mode memory addressing? (3 points)

e) Code an 80286 descriptor that describes a protected mode memory segment that begins at location 210000H and ends at location 2100FFH. This memory segment is a code segment which can be read. (5 points)

f) What are program invisible registers? (3 points)

g) If BX = 0100H and SI = 1234H, comment on the operation of mov [BX],[SI] instruction? (4 points)

Problem 2: Memory Map and Address/Operand Calculation (20 marks)

Answer the following problems. Each of the following can be answered independently.

(a) An 80c88/188 system application requires 8K X 8 of SRAM and 256K X 8 bytes of EPROM. The SRAM starts at address 00000H and the EPROM ends at address FFFFFH. There are 4K X 8 SRAM devices and 128K X 8 EPROM devices available. Draw a memory map of the system showing each device's boundaries in hexadecimal. (8 points)

(b) The following data allocation has been done for a program. Assume that DS points to a data segment and DS=1000h. (12 points; 4 points each)

data segment Numbers db 5,6,7,8, Checksum dw 0109h LineArray dw 0012h, 0015h, 4025h data ends

What addressing mode is used for each mov statement. Calculate the physical address of the data memory accessed by the following statements (show the value in both segment:offset and absolute address formats) and the data value accessed in each of the following cases. i) mov BX, mov SI, mov AL, [BX][SI]

ii) mov CX, LineArray[2]

iii) mov AX, [BX+SI+1]

Problem 3 Assembly Programming (30 marks)

a) Write an assembly language program section for each of the following C language program structures (or pseudo-code). Assume all the variables to be declared in the data segment as 16-bit signed integers. (10 points; 5 points each) i) if (x >=y) x=x+10;

00000H