diff --git a/cli/arvelie/arvelie.tal b/cli/arvelie/arvelie.tal index db4f3e3..c0e34eb 100644 --- a/cli/arvelie/arvelie.tal +++ b/cli/arvelie/arvelie.tal @@ -35,7 +35,6 @@ BRK POP .buf parse - #010e DEO BRK @@ -59,7 +58,7 @@ JMP2r ( date ) INC LDZ2 bytedec STH2r ADD2 INC2 ( year ) ROT LDZ2 bytedec #07d6 ADD2 emit-gre - #010f DEO + #800f DEO JMP2r @@ -74,14 +73,27 @@ JMP2r ( day ) STHr LDZ2 bytedec #0001 SUB2 doty SWP2 emit-arv #0a18 DEO - #010f DEO + #800f DEO JMP2r @emit-gre ( doty* year* -- ) - pdec #2018 DEO - pdec #0a18 DEO + DUP2 pdec LIT "- #18 DEO + ,&y STR2 + STH2 + #0c00 + &l + DUP [ LIT2 &y $2 ] ROT diam #00 SWP + DUP2 STH2kr GTH2 ?&skip + STH2k SUB2r !&continue + &skip + POP2 !&end + &continue + POP2 + INC GTHk ?&l + &end + NIP INC emit-dec LIT "- #18 DEO STH2r NIP emit-dec #0a18 DEO JMP2r @@ -98,7 +110,14 @@ JMP2r @emit-num ( num -- ) - #30 ADD #18 DEO + LIT "0 ADD #18 DEO + +JMP2r + +@emit-dec ( byte -- ) + + DUP #0a DIV emit-num + #0a DIVk MUL SUB emit-num JMP2r diff --git a/cli/arvelie/build.sh b/cli/arvelie/build.sh index a3794c3..31460d4 100755 --- a/cli/arvelie/build.sh +++ b/cli/arvelie/build.sh @@ -7,7 +7,7 @@ LIN="uxncli $HOME/roms/uxnlin.rom" SRC="${ID}.tal" DST="${ID}.rom" CPY="$HOME/roms" -ARG="2023-05-25" +ARG="" if [[ "$*" == *"--lint"* ]] then @@ -21,5 +21,10 @@ then cp $DST $CPY fi -$EMU $DST $ARG +echo "today: " +$EMU $DST +echo "gre->arv: " +$EMU $DST "2023-05-25" +echo "arv->gre: " +$EMU $DST "17K04"