uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 317d71654e457854ba1ba3657424b1687ff5a97b
parent e82acc875b018c8c0b5d520375263ddde65eb2fd
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Wed, 13 Oct 2021 22:58:17 +0100

Pass output file argument to asma too

Diffstat:
Mbuild.sh | 2+-
Metc/asma-test.sh | 4++--
Mprojects/software/asma.tal | 7++++++-
3 files changed, 9 insertions(+), 4 deletions(-)

diff --git 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 @@ -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 @@ -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