You are on page 1of 4

MIDTERM EXAM Semester/Academic year 1 2022-2023

Date 31/10/2022
Course title Computer System Engineering
UNIVERSITY OF TECHNOLOGY - VNUHCM Course ID EE3401
FACULTY OF EEE Duration 60 mins. Question sheet code
Student name: ID:

Notes - Students can use one A4 paper with two sides for your references.
: - Students submit the question sheets together with the answer sheets

Problem 1: (L.O.1 & L.O.2) (20pts) Answer the following questions

1. x86-8086 processors have:


 Max CPU clock: 10 MHz True False .
 x86 processors are big-endian True False .
 Program counter is IP True False .
 The maximum linear address space is limited to 64 KB True False .
 Segment registers allow programs to address maximum 64KB True False .

2. ARM processors have:


 16-bit architecture True False .
 37 registers all of which are 32-bit long True False .
 Only have 3-operand instructions True False .
 Halfword means 14 bits True False .
 R14 is the program counter True False .

Problem 2: (L.O.3) (10pts) Given the data segment DS = 0x3460.

The instruction “mov [0x789A], AX” will store the content of AX in which 20-bit address?

------------------------------------------------------------------------------------------------------------------------------------------
Write student’s name and ID into your exam paper Page 1
Problem 3: (L.O.5) (10pts) Answer the value of registers after the instruction is executed.

No. Before Instruction After


1 AX: DC F2 mov BL, AH AX:
BX: 00 5A BX:
2 EBX: 33 F1 03 A4 and ECX, EBX EBX:
ECX: 22 B3 AE 23 ECX:
3 EAX: 00 00 A5 98 mul EAX, Double EAX:
Double: 00 00 37 F1 SF: ZF: CF: OF:
4 EAX: 00 08 B1 3A sub EAX, 570000 EAX:
SF: ZF: CF: OF:
5 ECX: F2 45 67 C6 shr ECX, 5 ECX: 07 92 2B 3E
SF: ZF:

Problem 4: (L.O.5) (15pts) Write an 80x86 assembly language program to compute the function:

Assume that:

 n is stored in register EAX (n>0, n is integer)


 F is stored in register EBX

ASM procedure
Calc:

------------------------------------------------------------------------------------------------------------------------------------------
Write student’s name and ID into your exam paper Page 2
Problem 5: (L.O.2) (15pts) Write a sequence of instructions that initialize vector 54H to point to the ISR
“isr54”.

Problem 6: (L.O.3) (15pts) Draw a circuit diagram to show how a device with interrupt vector A3H can
be connected on an 8088 microprocessor system.

------------------------------------------------------------------------------------------------------------------------------------------
Write student’s name and ID into your exam paper Page 3
Problem 7: (L.O.2) (15pts) Write Assembly code to do the following task: Read a 1-digit number from
the keyboard (ASCII from 30H – 39H) using interrupt "int 21h / AH = 01h", then convert it to number (x)
and calculate the cube (x3) of it. Store the result in CH register.

------------------------------------ END ------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------
Write student’s name and ID into your exam paper Page 4

You might also like