CS401 Computer Architecture and Assembly Language Programming
CS401 Computer Architecture and Assembly Language Programming
co
CS401 Computer Architecture and Assembly
Language Programming
6.
Final Term Examination – Spring 2005
Time Allowed: 150 Minutes
Instructions
Please read the following instructions carefully before attempting any question:
1. The duration of this examination is 150 minutes.
Best of Luck
ww
Write the values of limit A bit , P bit and AVL bit of the following descriptors.
1. dd 0x 00FEADEF , 0x 00B60718
2. dd 0x F8E2135A , 0 x 13DC1258
m
Question No. 2 Marks : 10
1. Why we need to disable the interrupts while calling interrupt INT 80hj.
co
2. Why we need to disable interrupts before we attempt to change the stack (i.e. ss
and sp).
6.
I. Consider the following code:
What would be in the variable Find after the execution of the code
given below?
;;-------------------------------------------------------------------------------------------------------------------------------
----
[org 0x0100]
mov cx, [num1]
mov ax, 0
78
l1: add ax, cx
sub cx, 1
jnz l1
vu
mov [Find], ax
mov ax, 0x4c00
int 0x21
num1: dw 15
Find: dw 0
;;------------------------------------------------------------------------------------------------------------------------------------------------------
w.
--------------------------------------------------
What will be the values in num1 and num2 after the execution of the
code given below?
ww
;;------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------
[org 0x0100]
mov ax, [num1]
mov bx, [num2]
add ax, bx
sub bx, ax
add ax, bx
m
mov ax, 0x4c00
int 0x21
num1: dw 5
num2: dw 10
co
;;------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------
6.
Write a function "ShowResult" that takes the address of two memory locations via the
stack, the one pushed first is the address of an array of integers and the second is the
length of that array. The function should print "Yes" if the array is in ascending order and
"No" if it is not.
Some sample output is shown below,
If array is:
5 7 9 13 Yes
Output
78
15 7 19 13 No
vu
w.
ww