Pass output file argument to asma too
This commit is contained in:
parent
e82acc875b
commit
317d71654e
2
build.sh
2
build.sh
|
@ -65,7 +65,7 @@ echo "Assembling(asma).."
|
|||
./bin/uxnasm projects/software/asma.tal bin/asma.rom
|
||||
|
||||
echo "Assembling(piano).."
|
||||
echo projects/examples/demos/piano.tal | bin/uxncli bin/asma.rom > bin/piano.rom 2> bin/piano.log
|
||||
bin/uxncli bin/asma.rom projects/examples/demos/piano.tal bin/piano.rom 2> bin/piano.log
|
||||
|
||||
echo "Running.."
|
||||
./bin/uxnemu bin/piano.rom
|
||||
|
|
|
@ -6,7 +6,7 @@ mkdir asma-test
|
|||
|
||||
expect_failure() {
|
||||
cat > asma-test/in.tal
|
||||
echo asma-test/in.tal | bin/uxncli asma-test/asma.rom > asma-test/out.rom 2> asma-test/asma.log
|
||||
bin/uxncli asma-test/asma.rom asma-test/in.tal asma-test/out.rom 2> asma-test/asma.log
|
||||
if ! grep -qF "${1}" asma-test/asma.log; then
|
||||
echo "error: asma didn't report error ${1} in faulty code"
|
||||
cat asma-test/asma.log
|
||||
|
@ -27,7 +27,7 @@ for F in $(find projects -path projects/library -prune -false -or -type f -name
|
|||
xxd "${UASM_BASE}.rom" > "${UASM_BASE}.hex"
|
||||
|
||||
ASMA_BASE="asma-test/asma-$(basename "${F%.tal}")"
|
||||
echo "${F}" | bin/uxncli asma-test/asma.rom > "${ASMA_BASE}.rom" 2> "${ASMA_BASE}.log"
|
||||
bin/uxncli asma-test/asma.rom "${F}" "${ASMA_BASE}.rom" 2> "${ASMA_BASE}.log"
|
||||
if ! grep -qF 'bytes of heap used' "${ASMA_BASE}.log"; then
|
||||
echo "error: asma failed to assemble ${F}, while uxnasm succeeded"
|
||||
cat "${ASMA_BASE}.log"
|
||||
|
|
|
@ -31,7 +31,12 @@
|
|||
DUP EOR ( 00 )
|
||||
;append-heap-byte JSR2 ( )
|
||||
|
||||
;asma-heap #0000 ;asma-assemble-file JSR2
|
||||
,&output-file LDR2 EOR ,&run JCN
|
||||
;heap LDA2 ,&output-file STR2
|
||||
BRK
|
||||
|
||||
&run
|
||||
;asma-heap LIT2 &output-file $2 ;asma-assemble-file JSR2
|
||||
#01 .System/halt DEO
|
||||
BRK
|
||||
|
||||
|
|
Loading…
Reference in New Issue