battclock.resource
Overview
Provides access to the battery-backed clock which keeps the time while the system is powered off.
Functions
Offset | Name | First OS Version |
---|---|---|
-6 | ResetBattClock | V36 |
-12 | ReadBattClock | V36 |
-18 | WriteBattClock | V36 |
ResetBattClock
Purpose | Reset the clock chip. | |
Synopsis | ResetBattClock() | |
Synopsis | Asm | ResetBattClock() |
Synopsis | C | void ResetBattClock( void ); |
This routine does whatever is needed to put the clock chip into a working and usable state and also sets the date on the clock chip to 01-Jan-1978.
ReadBattClock
Purpose | Read time from clock chip. | |
Synopsis | AmigaTime = ReadBattClock() | |
Synopsis | Asm | D0 = ReadBattClock() |
Synopsis | C | ULONG ReadBattClock(void); |
Returns | AmigaTime | The number of seconds from 01-Jan-1978 that the clock chip thinks it is. |
This routine reads the time from the clock chip and returns as the number of seconds from 01-jan-1978.
If the clock chip returns an invalid date, the clock chip reset and 0 is returned.
WriteBattClock
Purpose | Set the time on the clock chip. | |
Synopsis | WriteBattClock(AmigaTime) | |
Synopsis | Asm | WriteBattClock(D0) |
Synopsis | C | ULONG ReadBattClock(void); |
Inputs | AmigaTime | The number of seconds from 01-Jan-1978 that the clock chip thinks it is. |
This routine writes the time given in AmigaTime to the clock chip.
Other Information
Wiki References
page revision: 2, last edited: 13 Dec 2009 04:14