fixed 2-byte tokens in tokenizer

This commit is contained in:
FeralChild64 committed 2020-06-21 22:06:46 +02:00
1 parent 9846b69c71
commit 92fd4552c4
3 files changed
+11 -9

No files matched your search

-2
View File
@@ -5,8 +5,6 @@
cmd_slow: cmd_slow:
.break
#if CONFIG_MB_MEGA_65 #if CONFIG_MB_MEGA_65
// Command implementation for Mega65 // Command implementation for Mega65
+9 -2
View File
@@ -8,12 +8,19 @@
// //
tk_cut_away: tk_cut_away_2: // for two-bytes tokenized keywords
dec tk__len_unpacked
// FALLTROUGH
tk_cut_away_1: // for single-byte tokenized keywords
dec tk__len_unpacked // keyword length, afterwards number of bytes to cut away
inc tk__offset inc tk__offset
ldy tk__offset ldy tk__offset
dec tk__len_unpacked // keyword length, afterwards number of bytes to cut away
lda tk__len_unpacked lda tk__len_unpacked
clc clc
adc tk__offset adc tk__offset
+2 -5
View File
@@ -124,7 +124,7 @@ tokenise_line_keyword_V2:
// Cut away unnecessary bytes // Cut away unnecessary bytes
jsr tk_cut_away jsr tk_cut_away_1
// Special handling for REM command - after this one nothing more should be tokenised // Special handling for REM command - after this one nothing more should be tokenised
@@ -207,10 +207,7 @@ tokenise_line_keyword_CD:
// Cut away unnecessary bytes // Cut away unnecessary bytes
inc tk__offset jsr tk_cut_away_2
dec tk__len_unpacked
jsr tk_cut_away
jmp tokenise_line_loop jmp tokenise_line_loop
#endif // ROM layout #endif // ROM layout