Keep track of total lines assembled.

This commit is contained in:
Andrew Alderwick 2021-10-07 21:58:54 +01:00
parent ac2d30cdb9
commit 8a74c3455d
1 changed files with 5 additions and 3 deletions

View File

@ -71,7 +71,7 @@
@asma-print-line-count ( -- ) @asma-print-line-count ( -- )
;asma/log-level LDA #01 AND #00 EQU ,&skip JCN ;asma/log-level LDA #01 AND #00 EQU ,&skip JCN
;asma/line LDA2 ;asma-print-short JSR2 ;asma/lines LDA2 ;asma-print-short JSR2
;&lines ;asma-print-string JSR2 ;&lines ;asma-print-string JSR2
&skip &skip
JMP2r JMP2r
@ -254,7 +254,9 @@ include projects/library/file-read-chunks.tal
#00 OVR2 STA #00 OVR2 STA
STH2r ,asma-assemble-token JSR ( end-chunk* ws-char* not-newline / line^ ) STH2r ,asma-assemble-token JSR ( end-chunk* ws-char* not-newline / line^ )
asma-IF-ERROR ,&error JCN asma-IF-ERROR ,&error JCN
JMP INC2r ( end-chunk* ws-char* / line^ ) ,&not-newline JCN
,asma/lines LDR2 INC2 ,asma/lines STR2
&not-newline ( end-chunk* ws-char* / line^ )
;asma/break LDA ,&break JCN ;asma/break LDA ,&break JCN
INC2 STH2k ( end-chunk* start-of-token* / line^ start-of-token* ) INC2 STH2k ( end-chunk* start-of-token* / line^ start-of-token* )
,&loop JMP ,&loop JMP
@ -281,7 +283,7 @@ include projects/library/file-read-chunks.tal
STH2r ;asma-read-buffer JMP2r STH2r ;asma-read-buffer JMP2r
@asma [ @asma [
&pass $1 &state $1 &line $2 &break $1 &eof $1 &pass $1 &state $1 &line $2 &lines $2 &break $1 &eof $1
&token $2 &orig-token $2 &token $2 &orig-token $2
&addr $2 &written-addr $2 &flush-fn $2 &addr $2 &written-addr $2 &flush-fn $2
&src-filename $2 &dest-filename $2 &src-filename $2 &dest-filename $2