diff options
Diffstat (limited to 'programs/sub-suite/lexer.s')
-rw-r--r-- | programs/sub-suite/lexer.s | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/programs/sub-suite/lexer.s b/programs/sub-suite/lexer.s index c144f9a..dc5a3b0 100644 --- a/programs/sub-suite/lexer.s +++ b/programs/sub-suite/lexer.s @@ -8,7 +8,7 @@ lex: sty.q idx0 ; Clear the first index. sty.q idx1 ; Clear the second index. sty.q idx2 ; Clear the third index. - sty b ; Clear the isop flag. + sty regb ; Clear the isop flag. ; lda (ptr), y ; Get a character from the line. ; pha ; Preserve the character. ; jsr isdigit ; Is this character a digit? @@ -99,7 +99,7 @@ ptok_dot: ldb #$11 ; Set the delimiter comparison value to whitespace. jsr delmcpy ; Copy the string, to the lexeme buffer, until delimiter. @isop: - lda b ; Has the isop flag been set? + lda regb ; Has the isop flag been set? beq @dir ; No, so check for a directive. @rs: lda #TOK_RS ; Yes, so set the lexeme type to TOK_RS. @@ -248,7 +248,7 @@ ptok_alph: tba ; Use isdelm2 for the comparison. jsr delmcpy ; Copy the string, to the lexeme buffer, until delimiter. lda #0 ; Reset A. - sta b ; Clear the isop flag. + sta regb ; Clear the isop flag. @isop: ldb #0 ; Make the lexeme buffer, the first pointer. stb.q idx1 ; Reset the second index. @@ -272,7 +272,7 @@ ptok_alph: @found: lda #TOK_MNE ; Set the lexeme type to TOK_MNE. sta lex_type ; - inc b ; Set the isop flag. + inc regb ; Set the isop flag. @end: jsr make_tok ; Create the token. jsr set_cmdbuf ; Set the first pointer to the command buffer. @@ -325,23 +325,23 @@ init_lex: delmcpy: - sta a ; Save the delimiter check flag. - stb c ; Save the delimiter comparison value. + sta rega ; Save the delimiter check flag. + stb regc ; Save the delimiter comparison value. @loop: ldb #0 ; Reset the B register. - stb g ; Reset the byte count. + stb regg ; Reset the byte count. ldy.w idx0 ; Get the string index. lda.q (ptr), y ; Get eight bytes from the current line. @loop1: pha.q ; Save the string buffer. and #$FF ; Get the current byte. pha ; Preserve the character. - lda a ; Are we calling isdelm2? + lda rega ; Are we calling isdelm2? pla ; Get the character back. bne @isdelm2 ; Yes, so use isdelm2. jsr isdelm ; No, so get the delimiter value from isdelm. @delmchk: - and c ; Are both delimiter values, the same? + and regc ; Are both delimiter values, the same? pla.q ; Get back the string buffer. bne @end ; Yes, so we're done. bra @copy ; No, so start copying the character. @@ -354,8 +354,8 @@ delmcpy: inc.w idx0 ; Increment the string index. inc.w idx1 ; Increment the lexeme index. lsr #8 ; Shift in the next byte. - inc g ; Increment the byte count. - ldb g ; Get back the byte count. + inc regg ; Increment the byte count. + ldb regg ; Get back the byte count. cpb #7 ; Did we shift in eight bytes? beq @loop ; Yes, so get eight more bytes. bra @loop1 ; No, so keep shifting in more bytes. @@ -372,12 +372,12 @@ delmcpy: ; ldy.w idx0 ; Get the string index. ; lda (ptr), y ; Get a character from the line. ; pha ; Preserve the character. -; lda a ; Are we calling isdelm2? +; lda rega ; Are we calling isdelm2? ; pla ; Get the character back. ; bne @isdelm2 ; Yes, so use isdelm2. ; jsr isdelm ; No, so get the delimiter value from isdelm. ;@delmchk: -; and c ; Are both delimiter values, the same? +; and regc ; Are both delimiter values, the same? ; bne @end ; Yes, so we're done. ; bra @copy ; No, so start copying the character. ;@isdelm2: |