Clock Device

device-clock
calendarsave
The Clock device provides access to the current date and time, as well a user-configurable countdown timer. This device is polled every 100ms to check if there is a time r active.
;clock
.macro clock.year_w           $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_w          $28
.macro clock._on_timer        $2A
== [2][RO] year_w 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_w 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.