1 / 9

Lab # 11- Interrupt Handlers

Lab # 11- Interrupt Handlers. Two major uses of interrupts: scheduling of regularly occurring actions. example: multitasking operating systems use the timer interrupt to share CPU time between different tasks.

tacita
Download Presentation

Lab # 11- Interrupt Handlers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lab # 11- Interrupt Handlers • Two major uses of interrupts: • scheduling of regularly occurring actions. • example: multitasking operating systems use the timer interrupt to share CPU time between different tasks. • I/O Handling – interrupts are more efficient at handling sporadically occurring I/O than polling methods.

  2. Changing the Entry in the Interrupt Vector Table • Use Int 21h, function 25h. • Set Interrupt Vector - Set an entry in the Interrupt Vector Table to a new address. • Input • DS:DX points to the interrupt-handling routine; • AL=the interrupt number 1Ch • DX points to procedure that displays a character on the screen. Note that procedure uses IRET rather than RET (pops flags as well as CS:IP). • Also have all registers pushed onto stack at beginning.

  3. BIOS Interrupt Timer Service Routine • Software INT 1Ch is called by the BIOS Interrupt Timer Service Routine (int 08h) • Empty routine, • INT 08h is executed 18.2 times per second. • May be replaced by a user defined program. • 8253 Programmable Interval Timer/Counter - hardware that interrupts the system 18.2 times per second, updates the system date and clock, and controls the speaker. (Also responsible for refreshing RAM).

  4. Using the timer to print characters to the screen • The code is given to you to install the new vector in the vector table. • The code prints an “A” to the screen.

  5. Part A_2: Modify procedure that it also prints digits. • A new code segment is being used. If you want to save data in the old code and data segment, you need to push DS (and AX), and get the old data segment.

  6. Part B: Change the hline procedure from lab #9 so it is interrupt driven. Int 33h, AX=0Ch

  7. Part B: Change the hline procedure from lab #9 so it is interrupt driven. Int 33h, AX=0Ch

  8. Note here that you don't actually change the ISR. Just use one of it's functions. (Don't need IRET, just RET).

More Related