Unformatted text preview:

Lab # 11- Interrupt HandlersChanging the Entry in the Interrupt Vector TableBIOS Interrupt Timer Service RoutineUsing the timer to print characters to the screenPowerPoint PresentationSlide 6Slide 7Slide 8Slide 9Lab # 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.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.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).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.•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.•Part B: Change the hline procedure from lab #9 so it is interrupt driven.•Int 33h, AX=0ChPart B: Change the hline procedure from lab #9 so it is interrupt driven.Int 33h, AX=0Ch•Note here that you don't actually change the ISR. Just use one of it's functions. (Don't need IRET, just


View Full Document

MSU ECE 3724 - Lab 11 Interrupt Handlers

Documents in this Course
Timers

Timers

38 pages

TEST 4

TEST 4

9 pages

Flags

Flags

6 pages

Timers

Timers

6 pages

Timers

Timers

54 pages

TEST2

TEST2

8 pages

Load more
Download Lab 11 Interrupt Handlers
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 11 Interrupt Handlers and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 11 Interrupt Handlers 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?