Clock Device
device-clock=== Clock
The Clock device provides access to the current date and time, as well a user-configurable countdown timer.
;clock
.macro clock.year $20
.macro clock.month $22
.macro clock.monthday $23
.macro clock.weekday $24
.macro clock.hour $25
.macro clock.minute $26
.macro clock.second $27
.macro clock.timer $28
.macro clock.on_timer $2A
== [2][RO] year
Two bytes identifying the current year.
== [1][RO] month
A byte identifying the current month (1-12)
== [1][RO] monthday
A byte identifying the current day of the month.
== [1][RO] weekday
day of the week (0-6).
== [1][RO] hour
A byte identifying the current hour (0-23).
== [1][RO] minute
A byte identifying the current minute (0-59).
== [1][RO] second
A byte identifying the current second (0-59).
== [2][RW] timer
Two bytes identifying the start of the countdown timer, expressed in 1/256 of a second.
== [2][RW] on_timer
Address of the subroutine that will be executed when the countdown timer reaches 0.