... | ... |
@@ -33,6 +33,9 @@ |
33 | 33 |
|
34 | 34 |
;asma-init-next-pass JSR2 |
35 | 35 |
;asma-flush-to-file ;asma/flush-fn STA2 |
36 |
+ ;asma/dest-filename LDA2 ORA ,&filename-present JCN |
|
37 |
+ ;asma-flush-to-console ;asma/flush-fn STA2 |
|
38 |
+ &filename-present |
|
36 | 39 |
;asma/src-filename LDA2 ;asma-assemble-file-pass JSR2 |
37 | 40 |
asma-IF-ERROR ,&error JCN |
38 | 41 |
|
... | ... |
@@ -499,6 +502,20 @@ include projects/library/string.tal |
499 | 502 |
;asma-write-buffer .File/save DEO2 |
500 | 503 |
JMP2r |
501 | 504 |
|
505 |
+@asma-flush-to-console ( len* -- ) |
|
506 |
+ ORAk ,¬-empty JCN |
|
507 |
+ POP2 JMP2r |
|
508 |
+ |
|
509 |
+ ¬-empty |
|
510 |
+ ;asma-write-buffer DUP2 ROT2 ADD2 SWP2 ( end* ptr* ) |
|
511 |
+ &loop ( end* ptr* ) |
|
512 |
+ LDAk .Console/write DEO |
|
513 |
+ INC2 |
|
514 |
+ GTH2k ,&loop JCN |
|
515 |
+ |
|
516 |
+ POP2 POP2 |
|
517 |
+ JMP2r |
|
518 |
+ |
|
502 | 519 |
include projects/library/heap.tal |
503 | 520 |
|
504 | 521 |
( |