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

Return to the regular view of this page.

RDTIM

Read system clock

Table of Contents

Function AddressDescription
RDTIM FFDERead system clock

This routine is used to read the system clock. The clock's resolution is a 60th of a second. Three bytes are returned by the routine. The accumulator contains the most significant byte, the X index register contains the next most significant byte, and the Y index register contains the least significant byte.

Example:
readClockRead the system clock and store in zero page
JSRRDTIM
STYFREKZPLeast significant byte
STXFREKZP+1
STAFREKZP+2Most significant byte
RTS

Note: FREKZP (0x00FB) in this example is a 4 byte block of zeropage memory unused by Basic or Kernal and is available for user code.