Cleaned up checksum

This commit is contained in:
Devine Lu Linvega 2023-03-17 10:13:40 -07:00
parent cf0ead9964
commit 40989de536
2 changed files with 42 additions and 6 deletions

35
checksum/build.sh Executable file
View File

@ -0,0 +1,35 @@
#!/bin/sh -e
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxncli"
LIN="uxncli $HOME/roms/uxnlin.rom"
APP="$HOME/bin/butler push"
SRC="checksum.tal"
DST="checksum.rom"
CPY="$HOME/roms"
ARG="test.txt"
echo ">> Cleaning"
rm -rf bin
mkdir bin
if [[ "$*" == *"--lint"* ]]
then
echo ">> Linting $SRC"
$LIN $SRC
fi
echo ">> Assembling $SRC"
$ASM $SRC $DST
if [[ "$*" == *"--save"* ]]
then
echo ">> Saving $DST"
cp $DST $CPY
fi
echo ">> Running $DST"
$EMU $DST $ARG

View File

@ -10,7 +10,6 @@
|0100 ( -> )
;await-src .Console/vector DEO2
;dict/input pstr
BRK
@ -23,13 +22,14 @@ BRK
@on-ready ( -> )
#0a18 DEO
;src hash plong
#0a18 DEO
;src hash plong #2018 DEO ;src pstr #0a18 DEO
#010f DEO
BRK
(
@|core )
@hash ( filename* -- x* y* )
.File/name DEO2
@ -46,6 +46,9 @@ BRK
JMP2r
(
@|stdlib )
@scap ( str* -- end* )
LDAk #00 NEQ [ JMP JMP2r ] &w INC2 LDAk ?&w JMP2r
@sput ( chr str* -- )
@ -59,6 +62,4 @@ JMP2r
&s SWP plong/b
&b DUP #04 SFT plong/c
&c #0f AND DUP #09 GTH #27 MUL ADD #30 ADD #18 DEO JMP2r
@dict
&input "Input(.tal): 20 $1