Added option to write ROM to stdout (when dest-filename is null).
This commit is contained in:
parent
8a74c3455d
commit
d34ec6584c
|
@ -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
|
||||
|
||||
(
|
||||
|
|
Loading…
Reference in New Issue