Saturday , 23 November 2024

CS609 Assignment no 01 Spring 2013

Solution of Assignment No. 01
Semester: Spring 2013
System Programming-CS609

 

Total Marks: 20

 

Due Date: 03/May/2013

 

Instructions:

Please read the following instructions carefully before submitting assignment:

 

  • You will submit your assignment before or on due date on VU-LMS.
  • Assignment should be completed by your own efforts it should not be copied from internet, handouts or books.
  • You should submit your .doc File via assignment interface at VU-LMS.
  • Assignment sent via Email will not be replied and accepted/graded in any case.
  • If the submitted assignment does not open or file is corrupt, it will not be graded.
  • You will submit solution only in document (.doc or .docx) File.

 

Objectives:

 

To understand the use of ISR and its services.

 

 

For any query about the assignment, contact at cs609@vu.edu.pk

Assignment Questions

 

Question 1:                                                                                                                               Marks 10     

 

Answer the following questions precisely. Do not include irrelevant data in your answers. Any answer with more than three lines will neglect your marks. (2 marks for each)

Q1. Where are the interrupt vectors located in the microprocessors memory?

Q2. Which interrupt vectors are reserved by Intel?

Q3. Explain the operation of IRET instruction.

Q4. List the events that occur when an interrupt becomes active.

Q5. Explain the purpose of the trap flag (TF).

 

Question 2:                                                                                                                               Marks 10     

 

Write a C program that should write the value of ‘k’ in the keyboard buffer whenever the letter ‘z’ is pressed from keyboard.

 

 

BEST OF LUCK

 

Check Also

CS609 today solved Papers by Muhammad Zeeshan & Aamer Abbas

Quiz Start Time: 06:58 PM Time Left 34 sec(s) Question # 1 of 10 ( …

2 comments

  1. Please post the solution. Thanks.

  2. Q # 1 Solution
    (a) interrupt reside in memory and supported by operating system reside in kernal in case of Dos kernal is io.sys.
    (b) The first 32 interrupt vector locations are reserved for Intel
    (c) In Real Address Mode, iret pops CS, the flags register, and the instruction pointer from the stack and resumes the routine that was interrupted. In Protected Mode, the setting of the nested task flag (NT) determines the action of iret. The IOPL flag register bits are changed when CPL equals 0 and the new flag image is popped from the stack.iret returns from an interrupt procedure without a task switch if NT equals 0. Returned code must be equally or less privileged than the interrupt routine as indicated CS selector RPL bits popped from the stack. If the returned code is less privileged, iret pops SS and the stack pointer from the stack.iret reverses the operation of an INT or CALL that caused the task switch if NT equals 1. The task executing iret is updated and saved in its task segment. The code that follows iret is executed if the task is re-entered.

    (e) A trap flag permit operation of a processor in a single step mode. if such a flag is available debugger can use it to step through the execution of a computer program.
    (d)
    Event that can generate interrupt include a timer overflow or research an assign value, a serial input device has receive a new character, a serial output device is ready to send a new character, an input pin has change state, the system voltage has dropped below a safe level, ADC has finished a new conversion.

Leave a Reply

Your email address will not be published. Required fields are marked *

*