| ... | ... |
@@ -12,6 +12,7 @@ |
| 12 | 12 |
|0150 ;Mouse { x 2 y 2 state 1 chord 1 }
|
| 13 | 13 |
|0160 ;File { pad 8 name 2 length 2 load 2 save 2 }
|
| 14 | 14 |
|0180 ;Audio { wave 2 envelope 2 pad 4 volume 1 pitch 1 play 1 value 2 delay 2 finish 1 }
|
| 15 |
+|01a0 ;DateTime { year 2 month 1 day 1 hour 1 minute 1 second 1 dotw 1 doty 2 isdst 1 refresh 1 }
|
|
| 15 | 16 |
|01F0 ;System { pad 8 r 2 g 2 b 2 }
|
| 16 | 17 |
|
| 17 | 18 |
( vectors ) |
| ... | ... |
@@ -17,7 +17,7 @@ |
| 17 | 17 |
|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
|
| 18 | 18 |
|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 color 1 }
|
| 19 | 19 |
|0130 ;Sprite { vector 2 pad 6 x 2 y 2 addr 2 color 1 }
|
| 20 |
-|01a0 ;Time { year 2 month 1 day 1 hour 1 minute 1 second 1 dow 1 doy 2 isdst 1 get 1 }
|
|
| 20 |
+|01a0 ;DateTime { year 2 month 1 day 1 hour 1 minute 1 second 1 dotw 1 doty 2 isdst 1 refresh 1 }
|
|
| 21 | 21 |
|
| 22 | 22 |
( program ) |
| 23 | 23 |
|
| ... | ... |
@@ -30,11 +30,11 @@ BRK |
| 30 | 30 |
|
| 31 | 31 |
@FRAME |
| 32 | 32 |
|
| 33 |
- #00 =Time.get |
|
| 33 |
+ #00 =DateTime.refresh |
|
| 34 | 34 |
|
| 35 | 35 |
( only draw once per second ) |
| 36 |
- ~Time.second ~current.second NEQ #01 JNZ BRK |
|
| 37 |
- ~Time.second =current.second |
|
| 36 |
+ ~DateTime.second ~current.second NEQ #01 JNZ BRK |
|
| 37 |
+ ~DateTime.second =current.second |
|
| 38 | 38 |
|
| 39 | 39 |
( clear ) |
| 40 | 40 |
#0080 SCALEX #0080 SCALEY ~needles.sx ~needles.sy #00 ,draw-line JSR2 |
| ... | ... |
@@ -42,13 +42,13 @@ BRK |
| 42 | 42 |
#0080 SCALEX #0080 SCALEY ~needles.hx ~needles.hy #00 ,draw-line JSR2 |
| 43 | 43 |
|
| 44 | 44 |
( place ) |
| 45 |
- #00 ~Time.second #0002 MUL2 ,table ADD2 LDR2 |
|
| 45 |
+ #00 ~DateTime.second #0002 MUL2 ,table ADD2 LDR2 |
|
| 46 | 46 |
#00 SWP SCALEY =needles.sy |
| 47 | 47 |
#00 SWP SCALEX =needles.sx |
| 48 |
- #00 ~Time.minute #0002 MUL2 ,table ADD2 LDR2 |
|
| 48 |
+ #00 ~DateTime.minute #0002 MUL2 ,table ADD2 LDR2 |
|
| 49 | 49 |
#00 SWP #0004 DIV2 #0003 MUL2 #0020 ADD2 SCALEY =needles.my |
| 50 | 50 |
#00 SWP #0004 DIV2 #0003 MUL2 #0020 ADD2 SCALEX =needles.mx |
| 51 |
- #00 ~Time.hour 12HOURS #05 MUL #0002 MUL2 ,table ADD2 LDR2 |
|
| 51 |
+ #00 ~DateTime.hour 12HOURS #05 MUL #0002 MUL2 ,table ADD2 LDR2 |
|
| 52 | 52 |
#00 SWP #0002 DIV2 #0040 ADD2 SCALEY =needles.hy |
| 53 | 53 |
#00 SWP #0002 DIV2 #0040 ADD2 SCALEX =needles.hx |
| 54 | 54 |
|
| ... | ... |
@@ -72,22 +72,22 @@ BRK |
| 72 | 72 |
~Screen.height #0002 DIV2 #0048 ADD2 =Sprite.y |
| 73 | 73 |
~Screen.width #0002 DIV2 |
| 74 | 74 |
DUP2 #0020 SUB2 =Sprite.x |
| 75 |
- ,font_hex #00 ~Time.hour #0a DIV #08 MUL ADD2 =Sprite.addr |
|
| 75 |
+ ,font_hex #00 ~DateTime.hour #0a DIV #08 MUL ADD2 =Sprite.addr |
|
| 76 | 76 |
#02 =Sprite.color |
| 77 | 77 |
DUP2 #0018 SUB2 =Sprite.x |
| 78 |
- ,font_hex #00 ~Time.hour #0a MOD #08 MUL ADD2 =Sprite.addr |
|
| 78 |
+ ,font_hex #00 ~DateTime.hour #0a MOD #08 MUL ADD2 =Sprite.addr |
|
| 79 | 79 |
#02 =Sprite.color |
| 80 | 80 |
DUP2 #0008 SUB2 =Sprite.x |
| 81 |
- ,font_hex #00 ~Time.minute #0a DIV #08 MUL ADD2 =Sprite.addr |
|
| 81 |
+ ,font_hex #00 ~DateTime.minute #0a DIV #08 MUL ADD2 =Sprite.addr |
|
| 82 | 82 |
#02 =Sprite.color |
| 83 | 83 |
DUP2 =Sprite.x |
| 84 |
- ,font_hex #00 ~Time.minute #0a MOD #08 MUL ADD2 =Sprite.addr |
|
| 84 |
+ ,font_hex #00 ~DateTime.minute #0a MOD #08 MUL ADD2 =Sprite.addr |
|
| 85 | 85 |
#02 =Sprite.color |
| 86 | 86 |
DUP2 #0010 ADD2 =Sprite.x |
| 87 |
- ,font_hex #00 ~Time.second #0a DIV #08 MUL ADD2 =Sprite.addr |
|
| 87 |
+ ,font_hex #00 ~DateTime.second #0a DIV #08 MUL ADD2 =Sprite.addr |
|
| 88 | 88 |
#02 =Sprite.color |
| 89 | 89 |
DUP2 #0018 ADD2 =Sprite.x |
| 90 |
- ,font_hex #00 ~Time.second #0a MOD #08 MUL ADD2 =Sprite.addr |
|
| 90 |
+ ,font_hex #00 ~DateTime.second #0a MOD #08 MUL ADD2 =Sprite.addr |
|
| 91 | 91 |
#02 =Sprite.color |
| 92 | 92 |
POP2 |
| 93 | 93 |
|
| ... | ... |
@@ -15,7 +15,7 @@ |
| 15 | 15 |
|0110 ;Console { pad 8 char 1 byte 1 short 2 }
|
| 16 | 16 |
|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 color 1 }
|
| 17 | 17 |
|0130 ;Sprite { pad 8 x 2 y 2 addr 2 color 1 }
|
| 18 |
-|01a0 ;DateTime { year 2 month 1 day 1 hour 1 minute 1 second 1 dow 1 doy 2 isdst 1 pad 4 get 1 }
|
|
| 18 |
+|01a0 ;DateTime { year 2 month 1 day 1 hour 1 minute 1 second 1 dotw 1 doty 2 isdst 1 pad 4 refresh 1 }
|
|
| 19 | 19 |
|
| 20 | 20 |
( program ) |
| 21 | 21 |
|
| ... | ... |
@@ -81,7 +81,7 @@ |
| 81 | 81 |
~DateTime.year #07d6 SUB2 |
| 82 | 82 |
#000a ,modf JSR2 ,digit JSR2 |
| 83 | 83 |
,digit JSR2 |
| 84 |
- ~DateTime.doy |
|
| 84 |
+ ~DateTime.doty |
|
| 85 | 85 |
#000e ,modf JSR2 ^letter JSR |
| 86 | 86 |
#000a ,modf JSR2 ^digit JSR |
| 87 | 87 |
^digit JSR |
| ... | ... |
@@ -185,7 +185,7 @@ |
| 185 | 185 |
^$loop JMP |
| 186 | 186 |
|
| 187 | 187 |
@update-fps ( -- ) |
| 188 |
- #00 =DateTime.get |
|
| 188 |
+ #00 =DateTime.refresh |
|
| 189 | 189 |
~fps.next #01 ADD =fps.next |
| 190 | 190 |
~DateTime.second ~fps.second NEQ JMP JMP2r |
| 191 | 191 |
~DateTime.second =fps.second |