diff options
Diffstat (limited to 'programs/sub-suite/lexer.s')
-rw-r--r-- | programs/sub-suite/lexer.s | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/programs/sub-suite/lexer.s b/programs/sub-suite/lexer.s index 72f1db6..50bf21e 100644 --- a/programs/sub-suite/lexer.s +++ b/programs/sub-suite/lexer.s @@ -18,15 +18,15 @@ lex: ; jsr isdigit ; Is this character a digit? ; pla ; Get the character back. @getline: - lda #2 ; Get the third byte, of the line table address. - lsl #$10 ; Shift it by 2 bytes. ldb #1 ; Set the second pointer - lda.w lline ; to the last line. + lda.q lline ; to the last line. jsr set_ptr ; - lda.w (ptr2) ; Get the next line. + ldy #ln.next ; Set the index to the next line pointer. + lda.q (ptr2), y ; Get the next line. jsr set_ptr ; Set the second pointer to the next line. - sta.w cline ; Make it the current line. + sta.q cline ; Make it the current line. and #0 ; Reset A. + tay ; Reset Y. @loop: ldy.w idx0 ; Get the string index. lda (ptr), y ; Get a character from the line. |