From ea9e70b5925987964c41b69649a368409a2e9180 Mon Sep 17 00:00:00 2001 From: neauoire Date: Tue, 5 Sep 2023 15:51:10 -0700 Subject: [PATCH] (base64) Added usage --- cli/base64/b64enc.tal | 12 ++++++++++-- cli/base64/build.sh | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cli/base64/b64enc.tal b/cli/base64/b64enc.tal index 493fd56..6ac0db0 100644 --- a/cli/base64/b64enc.tal +++ b/cli/base64/b64enc.tal @@ -1,6 +1,6 @@ ( uxncli b64enc.rom file.bin ) -|10 @Console &vector $2 &read $1 &pad $5 &write $1 &error $1 +|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1 |a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 |0000 @@ -11,6 +11,7 @@ |0100 @on-reset ( -> ) + .Console/type DEI ?{ ;usage / #010f DEO } ;await-src .Console/vector DEO2 BRK @@ -30,7 +31,7 @@ .queue LDZ #00 EQU ?&>no-pad #00 b64enc &>no-pad #0a18 DEO - #010f DEO + #800f DEO BRK ( @@ -74,3 +75,10 @@ scap/ ROT #00 SWP2 STA2 JMP2r +@ ( str* -- ) + LDAk #19 DEO + INC2 & LDAk ? + POP2 JMP2r + +@usage "usage: 20 "b64enc.rom 20 "data 0a $1 + diff --git a/cli/base64/build.sh b/cli/base64/build.sh index 1f3eb59..805b6d1 100755 --- a/cli/base64/build.sh +++ b/cli/base64/build.sh @@ -21,6 +21,7 @@ then cp $DST $CPY fi +$EMU $DST echo -n "source: " cat test.txt echo ""