home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
misc_programming
/
int1a.spc
< prev
next >
Wrap
Text File
|
1990-01-05
|
4KB
|
88 lines
Specification of Time of Day Interrupt Service (INT 1AH)
--------------------------------------------------------
* This routine allows the clocks to be set or read.
* The following are all functions provided by this routine.
Parameters:
(AH) = 00H Read the current system-timer time counter and
return with
(CX) = high portion of count (located at 40:6E)
(DX) = low portion of count (located at 40:6C)
(AL) = 0 - timer has not passed 24 hours since
last read
1 - if on another day.(reset to zero
after read) (located at 40:70)
(AH) = 01H Set the system-timer time counter using:
(CX) = high portion of count
(DX) = low portion of count
(AH) = 02H Read the real-time clock time and return with:
(CH) = hours in BCD (00-23)
(CL) = minutes in BCD (00-59)
(DH) = seconds in BCD (00-59)
(DL) = daylight saving enable (00-01)
(AH) = 03H Set the real-time clock time using:
(CH) = hours in BCD (00-23)
(CL) = minutes in BCD (00-59)
(DH) = seconds in BCD (00-59)
(DL) = 01 if daylight saving enable option,
else 00
(AH) = 04H Read the real-time clock day and return with:
(CH) = century in BCD (19 or 20)
(CL) = year in BCD (00-99)
(DH) = month in BCD (01-12)
(DL) = day in BCD (01-31)
(AH) = 05H Set the real-time clock day using:
(CH) = century in BCD (19 or 20)
(CL) = year in BCD (00-99)
(DH) = month in BCD (01-12)
(DL) = day in BCD (01-31)
(AH) = 06H Set the real-time clock alarm using:
(CH) = hours in BCD (00-23)
(CL) = minutes in BCD (00-59)
(DH) = seconds in BCD (00-59)
(AH) = 07H Reset real-time clock alarm
(AH) = 08H Set alarm time of RTC for power on mode using:
(CH) = hours in BCD (00-23)
(CL) = minutes in BCD (00-59)
(DH) = seconds in BCD (00-59)
(AH) = 09H Read alarm time of RTC and status return with:
(CH) = hours in BCD (00-23)
(CL) = minutes in BCD (00-59)
(DH) = seconds in BCD (00-59)
(DL) = alarm status
00 -- alarm not enable (AIE = 0)
01 -- alarm enable but will not
power_on system
02 -- alarm enable and will power_on
system
(AH) = 0AH - 0FFH -- reserved
* For all returns CY = 0 for successful operation.
* For (AH) = 2,4,6 - carry flag set if real time clock is not in operation.
* For (AH) = 6 - carry flag set if alarm is already enabled.
* Prior to set the real-time clock alarm (AH = 6), user must supply a
routine and intercept the correct address in the vector table for
interrupt 4AH.
* For all other invalid function number result is in no operation and CY=0.
Note:
1. Disable the RTC H/W interrupt while the function is served.
2. Avoid the update cycle while it reads the RTC time & date.
3. Disable the update cycle while it writes the RTC time & date.
4. Park the RTC index register to a safe position before it returns to the
caller.