Fixed issue with first month dates

This commit is contained in:
Devine Lu Linvega 2023-05-28 09:38:03 -07:00
parent 1fff235bb2
commit a63b360d89
2 changed files with 16 additions and 11 deletions

View File

@ -79,7 +79,7 @@ JMP2r
!emit-dec !emit-dec
@emit-arv ( doty* year* -- ) @emit-arv ( doty* year* -- )
#07d6 SUB2 NIP #07e0 SUB2 NIP
( year ) emit-dec ( year ) emit-dec
( month ) DUP2 #000e DIV2 NIP #11 ADD emit-num ( month ) DUP2 #000e DIV2 NIP #11 ADD emit-num
( digit3 ) #000e [ DIV2k MUL2 SUB2 ] NIP ( digit3 ) #000e [ DIV2k MUL2 SUB2 ] NIP
@ -101,10 +101,11 @@ JMP2r
@doty ( year* month* day* -- doty* ) @doty ( year* month* day* -- doty* )
ROT2 ,&y STR2 ROT2 ,&y STR2
LIT2r 0000 LIT2r 0000
SWP2 NIP #01 SUB #00 SWP2 NIP #01 SUB #00 EQUk ?&skip
&l &l
#00 OVR [ LIT2 &y $2 ] ROT diam STH2 ADD2r #00 OVR [ LIT2 &y $2 ] ROT diam STH2 ADD2r
INC GTHk ?&l INC GTHk ?&l
&skip
POP2 POP2
STH2r ADD2 STH2r ADD2
JMP2r JMP2r

View File

@ -1,4 +1,4 @@
#!/bin/sh -e #!/bin/sh
ID="arvelie" ID="arvelie"
ASM="uxncli $HOME/roms/drifblim.rom" ASM="uxncli $HOME/roms/drifblim.rom"
@ -21,12 +21,16 @@ then
cp $DST $CPY cp $DST $CPY
fi fi
echo "today" # printf "today "; $EMU $DST
$EMU $DST # printf "gre->arv "; $EMU $DST "2023-05-25"
echo "gre->arv" # printf "arv->gre "; $EMU $DST "17K04"
$EMU $DST "2023-05-25" # printf "error "; $EMU $DST "abc"
echo "arv->gre" # echo ""
$EMU $DST "17K04" # printf "00A00 -> "; $EMU $DST "2016-01-01"
echo "error" # printf "2016-01-01 -> "; $EMU $DST "00A00"
$EMU $DST "abc"
# printf "2016-01-14 -> 00B00"; $EMU $DST "2016-01-14"
$EMU $DST "2016-01-01"