home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / programming / misc_programming / int70.spc < prev    next >
Text File  |  1990-01-05  |  2KB  |  44 lines

  1.        Specification of CMOS Real Time Clock Interrupt Service (INT 70H)
  2.        ------------------------------------------------------------------
  3.  
  4. * This routine handles the periodic and alarm interrupt interrupt from the 
  5.   RTC.
  6.   Input frequency is 1.024 KHz or approximately 1024 interrupts every
  7.   second (programmed by POST) for the periodic interrupt. For the alarm
  8.   function, the interrupt will occur at the designated time.
  9. * Interrupts are enabled when the event or alarm function and interrupt of
  10.   RTC (IRQ8) is activated.
  11. * For the periodic interrupt, the handler will decrement the wait counter
  12.   (double word located at 40:9C) when it down count to nothing will clear 
  13.   the flag of RTC wait (location at 40:A0) and set 80H to the designated 
  14.   location (a pointer stored in 40:98).
  15. * For the alarm interrupt, the handler will issue INT 4AH which is provided
  16.   by the users prior to setting the real time clock alarm (INT 1AH, 
  17.   AH= 06H).
  18.  
  19. input:
  20.                 none
  21. output:
  22.                 none
  23.  
  24. reference BIOS data area:
  25.  
  26.         40:98   offset of user wait flag
  27.         40:9A   segment of user wait flag
  28.         40:9C   low word of user wait count
  29.         40:9E   high word of user wait count
  30.         40:A0   wait active flag
  31.                 = 00h -- POST acknowledged
  32.                 = 01h -- busy
  33.                 = 80h -- POSTED
  34.  
  35. port defined:
  36.  
  37.         70h --- RT/CMOS RAM address and NMI Mask
  38.         71h --- RT/CMOS data port
  39.  
  40. Note:
  41.  1. Subtract 976.5625 from the wait count every periodic interrupt because
  42.     the unit of the wait count is microsecond.
  43.     (1000000 us / 1024 = 976.5625 us)
  44.