home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / programming / misc_programming / int08.doc < prev    next >
Text File  |  1989-12-27  |  2KB  |  34 lines

  1. INT 08H (IRQ 0) - TIMER_INT hardwre interrupt
  2.         This routine handles the Timer Interrupt from channel 0 of the 8254
  3.         Timer chip. Input frequency is 1.19318 MHZ and the divisor is 65536.
  4.         Resulting in approximately 18.2 Interrupts every second.
  5.  
  6.         The Interrupt Handler maintains a Count (40:6C) of Interrupts since
  7.         Power On Time, which may be used to establish Time Of Day.
  8.         The Interrupt Handler also decreases the Motor Control Count (40:40)
  9.         of the diskette, and when it expires, will Turn Off the diskette
  10.         motor(s), and Reset the Motor Running Flags.
  11.         The Interrupt Handler will also invoke a user routine through
  12.         Interrupt 1Ch at every Time Tick. The user must code a routine and 
  13.         place the correct address in the vcetor table.
  14.  
  15. PDL:
  16.         Save the registers
  17.         decrease the TIMER_COUNT (TIMER_HIGH,TIMER_LOW - 40:6E,40:6C)
  18.         IF Timer Count equals 24 hours (TIMER_HIGH,TIMER_LOW) = (018h,0B0h) 
  19.         THEN
  20.             Set the TIMER_COUNT to zero,
  21.             Set the TIMER_OVERFLOW (40:70) to one 
  22.                 ( Timer has counted past 24 hours)
  23.         ENDIF
  24.         decrease MOTOR_COUNT (40:40)
  25.         IF MOTOR_COUNT equals to zero
  26.         THEN
  27.            Turn off motor running bits (bit 3,2,1,0 of 40:3F = 0,0,0,0)
  28.            Turn off the motor (Output the C0h to PORT 3F2h)
  29.         ENDIF
  30.         Call the user interrupt routine (INT 1CH)
  31.         Send EOI to 8259 Interrupt Controller
  32.         Restore the registers
  33.         return
  34.