feldy@CS.UCLA.EDU (04/15/87)
I want to install an interrupt routine for the timer interrupt 0x08.
How do I mask the timer interrupt off while I use the DOS call to
replace the interrupt vector?
I just need some sample assembler code for MS-DOS 2.1.
Bob Felderman
3732L Boelter Hall feldy@ats.ucla.edu
University of California ...!{trwspp,sdcrdcf,ihnp4,ucbvax}!ucla-cs!feldy
Los Angeles, CA 90024
(213) 825-2841ballou@BRAHMS.BERKELEY.EDU.UUCP (04/15/87)
In article <5523@shemp.UCLA.EDU> feldy@CS.UCLA.EDU (Bob Felderman) writes: >I want to install an interrupt routine for the timer interrupt 0x08. >How do I mask the timer interrupt off while I use the DOS call to >replace the interrupt vector? >I just need some sample assembler code for MS-DOS 2.1. Couldn't you just precede the code by CLI and use STI after changing the interrupt vector?
tom@vrdxhq.UUCP (04/16/87)
There are two ways to do it.
One way is simply to turn off interrupts and turn them on again ...
PUSHF
CLI
<< your code to install vector >>
POPF
Or, you can mask off the timer interrupt at the 8259 interrupt
controller via ...
; get the current mask
MOV DL, 021H ; 21h is mask port in AT
IN AH, DL
; save current mask
PUSH AX
; mask off the timer
OR AH, Timer_interrupt ; i don't know which line it is
; put new mask to 8259
OUT AH, DL
<< insert vector installation code here >>
; restore old mask
POP AX
OUT AH, DL
I'm sure I got some of the operand orders wrong, cause I don't
have any books in front of me, but you get the idea ...
Also, the literal Timer_interrupt should be replaced with 3 or
4 or 2 or whatever the timer interrupt into the 8259 is.