0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-20 12:55:11 +00:00
uxn/projects/examples/dev.time.usm
2021-03-28 11:20:36 -07:00

22 lines
416 B
Text

;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 }
|01F0 ;System { pad 8 r 2 g 2 b 2 }
|0200 ,RESET JMP2
|0204 ,ERROR JMP2
|0208 ,FRAME JMP2
( program )
@RESET BRK
@FRAME
#00 =Time.get
~Time.second ~current.second NEQ #01 JNZ BRK
~Time.second DUP =current.second =Console.byte
@ERROR BRK