Professional Documents
Culture Documents
Notes: - Students can use one A4 paper with two sides for your references.
- Students submit the question sheets together with the answer sheets
3. (5pts) Given the picture show how a device with the interrupt vector can be connected on an
8088 microprocessor system ?
------------------------------------------------------------------------------------------------------------------------------------------
Write student’s name and ID into your exam paper Page 1
What is the interrupt vector?
4. (5pts) How many modes of operation does Intel processor run? List them.
Problem 2: (L.O.5) (10pts) Answer the value of registers after the instruction is executed.
Problem 3: (L.O.5) (10pts) Write x86 Assembly language code for the following pseudo code:
Pseudo Code ASM code
------------------------------------------------------------------------------------------------------------------------------------------
Write student’s name and ID into your exam paper Page 2
Problem 4: (L.O.5) (10pts) Write an 80x86 assembly language program to compute:
Assume that:
ASM procedure
Calc:
int is_Even(int n)
{
if (n < 0)
return -1;
else if (n&0x01)
return 0;
else
return 1;
}
Rewrite this function in Assembly language (assume that n is stored in EBX, the return value is stored in
EAX):
is_Even:
------------------------------------------------------------------------------------------------------------------------------------------
Write student’s name and ID into your exam paper Page 3
Problem 6: (L.O.3) (10pts) Given the data segment DS = 0x7720.
The instruction “mov [0xDCEF], EAX” will store the content of EAX in which 20-bit address?
Segment address =
Offset address =
20-bit address =
Problem 7: (L.O.2) (10pts) Write a sequence of instructions that initialize vector 45H to point to the ISR
“isr45”.
------------------------------------------------------------------------------------------------------------------------------------------
Write student’s name and ID into your exam paper Page 4
Problem 8: (L.O.5) (10pts) Explain the uses of virtual memory.
Problem 9: (L.O.5) (10pts) What are memory problems with the following C codes? How to
solve the problems?
// After using s
------------------------------------------------------------------------------------------------------------------------------------------
Write student’s name and ID into your exam paper Page 5
delete[] s;
------------------------------------------------------------------------------------------------------------------------------------------
Write student’s name and ID into your exam paper Page 6