diff --git a/build.sh b/build.sh index f11b450..dddc2f2 100755 --- a/build.sh +++ b/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 diff --git a/etc/asma-test.sh b/etc/asma-test.sh index ff11356..97ccf27 100755 --- a/etc/asma-test.sh +++ b/etc/asma-test.sh @@ -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" diff --git a/projects/software/asma.tal b/projects/software/asma.tal index e6095b0..6dabd92 100644 --- a/projects/software/asma.tal +++ b/projects/software/asma.tal @@ -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