0% found this document useful (0 votes)
387 views1 page

Final Exam: Computer Organization & Assembly Language - Fall 2012

The document describes a final exam for a computer organization and assembly language course. It consists of 4 questions. Question 1 (worth 35 marks) asks students to implement new services for a multitasking kernel that can suspend, resume and create tasks. Question 2 (worth 25 marks) asks students to update the keyboard interrupt service to return uppercase letters when lowercase letters are pressed. Question 3 (worth 20 marks) asks students to push all values from a PCB structure onto the stack in reverse order. Question 4 (worth 15 marks total) asks students to evaluate the result of several assembly language instructions and express the results in hexadecimal. An additional 5 bonus marks are available for good code.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
387 views1 page

Final Exam: Computer Organization & Assembly Language - Fall 2012

The document describes a final exam for a computer organization and assembly language course. It consists of 4 questions. Question 1 (worth 35 marks) asks students to implement new services for a multitasking kernel that can suspend, resume and create tasks. Question 2 (worth 25 marks) asks students to update the keyboard interrupt service to return uppercase letters when lowercase letters are pressed. Question 3 (worth 20 marks) asks students to push all values from a PCB structure onto the stack in reverse order. Question 4 (worth 15 marks total) asks students to evaluate the result of several assembly language instructions and express the results in hexadecimal. An additional 5 bonus marks are available for good code.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

FAST – National University of Computer and Emerging Sciences, Lahore.

Computer Organization & Assembly Language – Fall 2012


Final Exam
Time Allowed: 3 hours Total Marks: 100
 The exam is OPEN BOOK and OPEN NOTES
 Solve all questions on answer sheets.

Q# 1 [35 Marks]
Consider a multi-tasking kernel running ‘n’ parallel tasks. The kernel is hooked on interrupt 0x80 (just as
the example given in book). Apart from creating new tasks, our multi-tasking kernel is now also capable of
“suspending” and “resuming” tasks. The kernel takes as parameter service number in ah, such that when
ah=0 , the kernel creates new tasks, when ah=1 it suspends and when ah=2 it resumes the particular task
requested by the user. SUSPEND and RESUME services take the PID of the process to be suspended as
parameter passed in the CX register. A suspended task can only be resumed by a RESUME request from the
user (calling int 0x80 with appropriate parameters). Implement these new services in the multitasking
kernel as a code snippet (don’t copy the kernel code).

Q# 2 [25 Marks]
BIOS has its keyboard services hooked at int 0x16. Update its “get character” service (ah=0) such that
whenever an alphabet’s key (a-z) is pressed on keyboard, this service returns the ascii of the respective
upper case letter (A-Z) in al. For every other service the 0x16 behavior remains unchanged.

Q# 3 [20 Marks]
Suppose that we have a pcb layout as follows. We want to push all these values on stack such that dummy is
pushed first and ax is on top of stack. Using string instructions only, implement the code to copy all the
register values from PCB to the stack.

Q# 4 [5 x 3 Marks]
Answer the following questions.
(a) What will be the value in al and ah (in hexadecimal) after the following instructions?
mov ah, 0
mov al, 152
shl ax, 1
(b) What will be the value in bx (in hexadecimal) after the following instructions?
mov bx, 0x90F4
rol bx, 1
(c) What will be the value in ax (in hexadecimal) after the following instructions?
mov ax, 0x40
mov bx, 0x10
push ax
push bx
add sp, 2
pop ax

5 MARKS ARE SET ASIDE AS BONUS FOR GOOD CODE

--GOOD LUCK--
1

You might also like