From 11392d883c8ccf082942d57a8fc33ae7c9d98ec2 Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Fri, 26 Apr 2019 23:05:14 +0930 Subject: [PATCH] remove debug output from tokeniser --- c64/basic/pack_word.s | 19 ------------------- c64/basic/tokenise_line.s | 36 +----------------------------------- 2 files changed, 1 insertion(+), 54 deletions(-) diff --git a/c64/basic/pack_word.s b/c64/basic/pack_word.s index f844c5bc..b1119b07 100644 --- a/c64/basic/pack_word.s +++ b/c64/basic/pack_word.s @@ -26,23 +26,9 @@ pack_word: ;; is incomplete, which is important for searching for abbreviated ;; key words.) - stx $0441 - - ldx #$0f - lda #$20 -* - sta $0658,x - dex - bpl - - - ldx $0441 - - lda #$00 - sta $043f ;; Make sure we have a sane request lda tokenise_work1 - sta $0440 bne + sec rts @@ -54,8 +40,6 @@ pack_word: pack_char_loop: - inc $043f - ;; Get the next char lda $0200,x @@ -204,9 +188,6 @@ nothing_to_flush: consider_next_char: ;; Pack next char - lda tokenise_work1 - sta $0680,x - inc $0658,x inx dec tokenise_work1 bne pack_char_loop diff --git a/c64/basic/tokenise_line.s b/c64/basic/tokenise_line.s index cb54604c..8e06df36 100644 --- a/c64/basic/tokenise_line.s +++ b/c64/basic/tokenise_line.s @@ -24,16 +24,11 @@ tokenise_char: ;; Check if we have reached end of the line? lda $0110 - tax - inc $0400,x cmp $0113 bne + ;; End of line reached - ldx #0 - stx $0450 - ;; Finished tokenising line ;; Update tokenise_work1 and terminate with null ldx $0112 @@ -43,8 +38,6 @@ tokenise_char: rts * ;; More to do - ldx #1 - stx $0450 ;; Maximum keyword length lda #7 @@ -55,20 +48,11 @@ tokenise_char_loop: ;; Returns packed length in tokenise_work2 and writes the packed ;; word at $0100+ - ldx #2 - stx $0450 - ;; Pack string ldx $0110 - stx $044e lda $0111 sta tokenise_work1 - bpl + -foo: inc $d020 - jmp foo - - * - sta $044f + jsr pack_word lda tokenise_work2 cmp #$10 @@ -78,31 +62,16 @@ foo: inc $d020 jmp do_basic_error * - ldx #3 - stx $0450 - ;; Search for it in keywords jsr keyword_search - ldx #4 - stx $0450 - ;; Did we find a keyword? bcc found_token_in_line - ldx #5 - stx $0450 - ;; Nope, so try shorter - ldx $0111 - stx $044d - inc $0608,x dec $0111 bne tokenise_char_loop - ldx #6 - stx $0450 - ;; Is not a token, so copy to output verbatim ldx $0110 ldy $0112 @@ -116,9 +85,6 @@ foo: inc $d020 found_token_in_line: - ldx #7 - stx $0450 - ;; Got a token, so write it out ldx $0112 sta $0200,x