Print usage
This commit is contained in:
parent
8b935669b6
commit
624ad7c1ae
|
@ -1,32 +1,25 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
ID="checksum"
|
||||||
ASM="uxncli $HOME/roms/drifblim.rom"
|
ASM="uxncli $HOME/roms/drifblim.rom"
|
||||||
EMU="uxncli"
|
EMU="uxncli"
|
||||||
LIN="uxncli $HOME/roms/uxnlin.rom"
|
LIN="uxncli $HOME/roms/uxnlin.rom"
|
||||||
|
SRC="${ID}.tal"
|
||||||
SRC="checksum.tal"
|
DST="${ID}.rom"
|
||||||
DST="checksum.rom"
|
|
||||||
|
|
||||||
CPY="$HOME/roms"
|
CPY="$HOME/roms"
|
||||||
ARG="test.txt"
|
ARG="test.txt"
|
||||||
|
|
||||||
echo ">> Cleaning"
|
|
||||||
|
|
||||||
if [[ "$*" == *"--lint"* ]]
|
if [[ "$*" == *"--lint"* ]]
|
||||||
then
|
then
|
||||||
echo ">> Linting $SRC"
|
|
||||||
$LIN $SRC
|
$LIN $SRC
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ">> Assembling $SRC"
|
|
||||||
$ASM $SRC $DST
|
$ASM $SRC $DST
|
||||||
|
|
||||||
if [[ "$*" == *"--save"* ]]
|
if [[ "$*" == *"--save"* ]]
|
||||||
then
|
then
|
||||||
echo ">> Saving $DST"
|
|
||||||
cp $DST $CPY
|
cp $DST $CPY
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ">> Running $DST"
|
|
||||||
$EMU $DST $ARG
|
$EMU $DST $ARG
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
( uxncli checksum.rom file.bin )
|
( uxncli checksum.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
|
|a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|
||||||
|
|
||||||
|0000
|
|0000
|
||||||
|
@ -9,6 +9,14 @@
|
||||||
|
|
||||||
|0100 ( -> )
|
|0100 ( -> )
|
||||||
|
|
||||||
|
.Console/type DEI ?&on-arg
|
||||||
|
;dict/usage &w LDAk #19 DEO INC2 LDAk ?&w POP2
|
||||||
|
#010f DEO
|
||||||
|
|
||||||
|
BRK
|
||||||
|
|
||||||
|
&on-arg ( -> )
|
||||||
|
|
||||||
;await-src .Console/vector DEO2
|
;await-src .Console/vector DEO2
|
||||||
|
|
||||||
BRK
|
BRK
|
||||||
|
@ -22,8 +30,10 @@ BRK
|
||||||
|
|
||||||
@on-ready ( -> )
|
@on-ready ( -> )
|
||||||
|
|
||||||
;src hash plong #2018 DEO ;src pstr #0a18 DEO
|
;src
|
||||||
#010f DEO
|
DUP2 hash plong #2018 DEO
|
||||||
|
pstr #0a18 DEO
|
||||||
|
#800f DEO
|
||||||
|
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
@ -62,4 +72,6 @@ JMP2r
|
||||||
&s SWP plong/b
|
&s SWP plong/b
|
||||||
&b DUP #04 SFT plong/c
|
&b DUP #04 SFT plong/c
|
||||||
&c #0f AND DUP #09 GTH #27 MUL ADD #30 ADD #18 DEO JMP2r
|
&c #0f AND DUP #09 GTH #27 MUL ADD #30 ADD #18 DEO JMP2r
|
||||||
|
@dict
|
||||||
|
&usage "usage: 20 "checksum.rom 20 "input.bin 0a $1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue