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

  1.            Specification of Time of Day Interrupt Service (INT 1AH)
  2.            --------------------------------------------------------
  3.  
  4. * This routine allows the clocks to be set or read.
  5. * The following are all functions provided by this routine.
  6.   Parameters:
  7.         (AH) = 00H      Read the current system-timer time counter and 
  8.                         return with
  9.                             (CX) = high portion of count (located at 40:6E)
  10.                             (DX) = low portion of count (located at 40:6C)
  11.                             (AL) = 0 - timer has not passed 24 hours since
  12.                                        last read
  13.                                    1 - if on another day.(reset to zero
  14.                                        after read) (located at 40:70)
  15.  
  16.         (AH) = 01H      Set the system-timer time counter using:
  17.                             (CX) = high portion of count
  18.                             (DX) = low portion of count
  19.  
  20.         (AH) = 02H      Read the real-time clock time and return with:
  21.                             (CH) = hours in BCD (00-23)
  22.                             (CL) = minutes in BCD (00-59)
  23.                             (DH) = seconds in BCD (00-59)
  24.                             (DL) = daylight saving enable (00-01)
  25.  
  26.         (AH) = 03H      Set the real-time clock time using:
  27.                             (CH) = hours in BCD (00-23)
  28.                             (CL) = minutes in BCD (00-59)
  29.                             (DH) = seconds in BCD (00-59)
  30.                             (DL) = 01 if daylight saving enable option,
  31.                                     else 00
  32.  
  33.         (AH) = 04H      Read the real-time clock day and return with:
  34.                             (CH) = century in BCD (19 or 20)
  35.                             (CL) = year in BCD (00-99)
  36.                             (DH) = month in BCD (01-12)
  37.                             (DL) = day in BCD (01-31)
  38.  
  39.         (AH) = 05H      Set the real-time clock day using:
  40.                             (CH) = century in BCD (19 or 20)
  41.                             (CL) = year in BCD (00-99)
  42.                             (DH) = month in BCD (01-12)
  43.                             (DL) = day in BCD (01-31)
  44.  
  45.         (AH) = 06H      Set the real-time clock alarm using:
  46.                             (CH) = hours in BCD (00-23)
  47.                             (CL) = minutes in BCD (00-59)
  48.                             (DH) = seconds in BCD (00-59)
  49.  
  50.         (AH) = 07H      Reset real-time clock alarm
  51.  
  52.         (AH) = 08H      Set alarm time of RTC for power on mode using:
  53.                             (CH) = hours in BCD (00-23)
  54.                             (CL) = minutes in BCD (00-59)
  55.                             (DH) = seconds in BCD (00-59)
  56.  
  57.         (AH) = 09H      Read alarm time of RTC and status return with:
  58.                             (CH) = hours in BCD (00-23)
  59.                             (CL) = minutes in BCD (00-59)
  60.                             (DH) = seconds in BCD (00-59)
  61.                             (DL) = alarm status
  62.                                    00 -- alarm not enable (AIE = 0)
  63.                                    01 -- alarm enable but will not
  64.                                          power_on system
  65.                                    02 -- alarm enable and will power_on
  66.                                          system
  67.         (AH) = 0AH - 0FFH -- reserved
  68.  
  69. * For all returns CY = 0 for successful operation.
  70. * For (AH) = 2,4,6 - carry flag set if real time clock is not in operation.
  71. * For (AH) = 6 - carry flag set if alarm is already enabled.
  72. * Prior to set the real-time clock alarm (AH = 6), user must supply a
  73.   routine and intercept the correct address in the vector table for
  74.   interrupt 4AH.
  75. * For all other invalid function number result is in no operation and CY=0.
  76.  
  77.  
  78. Note:
  79.  1. Disable the RTC H/W interrupt while the function is served.
  80.  
  81.  2. Avoid the update cycle while it reads the RTC time & date.
  82.  
  83.  3. Disable the update cycle while it writes the RTC time & date.
  84.  
  85.  4. Park the RTC index register to a safe position before it returns to the
  86.     caller.
  87.  
  88.