diff --git a/projects/library/asma.tal b/projects/library/asma.tal index 34f5282..8b33bae 100644 --- 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 ,¬-empty JCN + POP2 JMP2r + + ¬-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 (