home *** CD-ROM | disk | FTP | other *** search
- INT 70H (IRQ 8) - ALARM INTERRUPT HANDLER (RTC) hardware interrupt
- This Routine handles the Periodic and Alarm Interrupts from the CMOS
- TIMER. Input Frequency is 1.024 KHZ or approximately 1024 interrupts
- every second for the Periodic Interrupt. For the Alarm Function,
- the interrupt will occur at the designated time.
-
- Interrupts are Enabled when the EVENT or ALARM Function is Activated.
- For the EVENT INTERRUPT, the Handler will decrease the WAIT COUNTER
- and when it expires will SET the designated Location to 80H. For the
- ALARM INTERRUPT, the user must provide a routine to intercept the
- correct address from the VECTOR TABLE invoked by INTERRUPT 4AH
- prior to SETTING the REAL TIMER CLOCK ALARM (INT 1AH, AH = 06H)
-
- PDL:
- Save the registers
- RESTART:
- Read the PIE and AIE bits from the index 0Bh of COMS (bit 5,4)
- IF PIE and AIE is not Enabled (= 0,0)
- THEN
- jump EXIT:
- ELSE
- Read the PF and AF bits from the index 0Ch of CMOS (bit 5,4)
- IF PIE is Enabled (=1) and Periodic Interrupt is occured (PF=1)
- THEN
- Decrease the User Wait Count (0,976) (High, Low - 40:9E,40:9C)
- IF User Wait Count < 0
- THEN
- Turn Off Periodic Interrupt Enable
- Set the Wait Active Flag Off (40:A0 = 0)
- Set User Wait Complete Flag ON (= 80H)
- (Offset Address to User Wait Complete Flag - 40:98,
- Segment Address to User Wait Complete Flag - 40:9A)
- ENDIF
- ENDIF
- IF AIE is Enabled (=1) and Alarm Interrupt is occured (AF=1)
- THEN
- Enable NMI from the CMOS
- Call the User interrupt routine (INT 4AH)
- jump RESTART:
- ENDIF
- ENDIF
-
- EXIT:
- Enable NMI from the CMOS
- Send EOI to 8259 Interrupt Controller
- restore the registers
- return