uxn/projects/examples/dev.time.usm

23 lines
416 B
Plaintext
Raw Normal View History

2021-03-26 17:01:51 -04:00
;current { second 1 }
( devices )
|0100 ;Console { pad 8 char 1 byte 1 short 2 }
|0190 ;Time { year 2 month 1 day 1 hour 1 minute 1 second 1 dow 1 doy 2 isdst 1 get 1 }
2021-03-28 14:20:36 -04:00
|01F0 ;System { pad 8 r 2 g 2 b 2 }
|0200 ,RESET JMP2
|0204 ,ERROR JMP2
|0208 ,FRAME JMP2
2021-03-26 17:01:51 -04:00
( program )
2021-03-28 14:20:36 -04:00
@RESET BRK
2021-03-26 17:01:51 -04:00
@FRAME
#00 =Time.get
~Time.second ~current.second NEQ #01 JNZ BRK
~Time.second DUP =current.second =Console.byte
@ERROR BRK