uxn

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

commit d34ec6584c85d9a3f7fa9613c124e50fb91ca4c5
parent 8a74c3455d489021d00e3f81e2b994f6a121be1b
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Thu,  7 Oct 2021 21:59:49 +0100

Added option to write ROM to stdout (when dest-filename is null).

Diffstat:
Mprojects/library/asma.tal | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/projects/library/asma.tal b/projects/library/asma.tal @@ -33,6 +33,9 @@ ;asma-init-next-pass JSR2 ;asma-flush-to-file ;asma/flush-fn STA2 + ;asma/dest-filename LDA2 ORA ,&filename-present JCN + ;asma-flush-to-console ;asma/flush-fn STA2 + &filename-present ;asma/src-filename LDA2 ;asma-assemble-file-pass JSR2 asma-IF-ERROR ,&error JCN @@ -499,6 +502,20 @@ include projects/library/string.tal ;asma-write-buffer .File/save DEO2 JMP2r +@asma-flush-to-console ( len* -- ) + ORAk ,&not-empty JCN + POP2 JMP2r + + &not-empty + ;asma-write-buffer DUP2 ROT2 ADD2 SWP2 ( end* ptr* ) + &loop ( end* ptr* ) + LDAk .Console/write DEO + INC2 + GTH2k ,&loop JCN + + POP2 POP2 + JMP2r + include projects/library/heap.tal (