0% found this document useful (0 votes)
109 views3 pages

CS401 Computer Architecture and Assembly Language Programming

This document contains instructions and 4 questions for a final exam in Computer Architecture and Assembly Language Programming. Question 1 (10 marks) asks to write the values of specific descriptor bits for two given descriptors. Question 2 (10 marks) asks to give short answers about why interrupts need to be disabled for certain operations. Question 3 (10 marks) contains two subquestions about the values in variables after code execution. Question 4 (20 marks) asks to write an assembly function that checks if an array passed via the stack is in ascending order and prints the result.

Uploaded by

lun p charo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views3 pages

CS401 Computer Architecture and Assembly Language Programming

This document contains instructions and 4 questions for a final exam in Computer Architecture and Assembly Language Programming. Question 1 (10 marks) asks to write the values of specific descriptor bits for two given descriptors. Question 2 (10 marks) asks to give short answers about why interrupts need to be disabled for certain operations. Question 3 (10 marks) contains two subquestions about the values in variables after code execution. Question 4 (20 marks) asks to write an assembly function that checks if an array passed via the stack is in ascending order and prints the result.

Uploaded by

lun p charo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

m

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.

3. Answer all questions.


a. There is no choice.
78
2. This examination is open Handouts.

b. You will have to answer correctly all questions in this


examination to get the maximum possible marks.
4. Do not ask any questions about the contents of this examination
from anyone.
a. If you think that there is something wrong with any of the
vu
questions, attempt it to the best of your understanding.
b. If you believe that some essential piece of information is
missing, make an appropriate assumption and use it to solve
the problem.
5. You have been provided with all assembly tools so you can use
assembly tools also.
6. Your paper contains 4 questions.
w.

All Coding questions should be answered using the Assembly language


syntax.

Best of Luck
ww

Total Marks: 50 Total Questions: 04

Question No. 1 Marks : 10

Answer the following regarding protected mode descriptors:

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

Give the short answer of the following:

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).

Question No. 3 Marks : 10

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.

--------------------------------------------------

II. Consider the following code:

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
;;------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------

Question No. 4 Marks : 20

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy