This the multi-page printable view of this section.Click here to print.

Return to the regular view of this page.

SETTIM

Set system clock

Table of Contents

Function AddressDescription
SETTIM FFDBSet system clock

A system clock is maintained by an interrupt routine that updates the clock every 1/60th of a second (one "jiffy"). The clock is three bytes long, which gives it the capability to count up to 5,184,000 jiffies (24 hours). At that point the clock resets to zero.

Before calling this routine to set the clock, the accumulator must contain the most significant byte, the X index register the next most significant byte, and the Y index register the least significant byte of the initial time setting (in jiffies).

Example:
setClockSet clock to 10 minutes = 600 seconds = 3600 jiffies
LDA#0Most significant byte
LDX#>3600
LDY#<3600Least significant byte
JMPSETTIM