From 8c90c087760c629a6a4d804229e5b3be4d08a8e0 Mon Sep 17 00:00:00 2001 From: Daniel Serpell Date: Sun, 25 Oct 2026 17:29:15 -0300 Subject: [PATCH 1/2] Clear carry in name_new and avoid reloading it in emit_varn --- src/actions.asm | 4 +--- src/vars.asm | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/actions.asm b/src/actions.asm index 2eb59aa..d4e7324 100644 --- a/src/actions.asm +++ b/src/actions.asm @@ -444,7 +444,7 @@ xit: rts ; Search existing var jsr var_search bcs exit - cmp tmp3 + eor tmp3 beq emit_varn ::xit_label_err: not_found: @@ -470,7 +470,6 @@ exit: .proc emit_varn ; Store VARN txa - clc jmp parser_emit_byte .endproc @@ -545,7 +544,6 @@ do_create: ldx #label_ptr - prog_ptr jsr name_new inc label_count - clc rts .endproc diff --git a/src/vars.asm b/src/vars.asm index 9d93d7d..c4537ee 100644 --- a/src/vars.asm +++ b/src/vars.asm @@ -224,7 +224,8 @@ loop: dey bpl loop -end: rts +end: clc + rts .endproc ; vi:syntax=asm_ca65 From cf8fa2ca892e93e99a551ec63fb9b2c935b8b471 Mon Sep 17 00:00:00 2001 From: Daniel Serpell Date: Fri, 23 Oct 2026 19:44:01 -0300 Subject: [PATCH 2/2] Remove dead syntax table rows Drop the unreachable ADR string-array alternative and the empty FUNC_MARK/MARK_RETURN pass rules. Removing the ADR row saves 5 bytes, leaving fbi.xex at 8170 bytes and fb.xex at 9850 bytes on top of the previous carry cleanup. Aided by Opencode / DeepSeek V4.1 Flash 1017 --- src/syntax/basic.syn | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/syntax/basic.syn b/src/syntax/basic.syn index 0f71bee..b00373b 100644 --- a/src/syntax/basic.syn +++ b/src/syntax/basic.syn @@ -142,7 +142,6 @@ ADR_EXPR: string or variable emit { TOK_VAR_LOAD, VT_ARRAY_BYTE } E_VAR_SEARCH emit { TOK_NUM, VT_ARRAY_WORD } E_LABEL emit { TOK_NUM, VT_ARRAY_BYTE } E_LABEL - emit { TOK_VAR_LOAD, VT_ARRAY_STRING } E_VAR_SEARCH emit { TOK_VAR_ADDR } E_VAR_WORD USR_EXPR_MORE: @@ -190,7 +189,6 @@ INT_FUNCTIONS: integer variable or function "ASc" STR_EXPR emit { TOK_PUSH_1, TOK_ADD, TOK_PEEK } # TODO: does not check for empty strings. FUNC_MARK: - pass # Used to handle PADDLE/STICK/PTRIG/STRIG RD_PORT: @@ -490,7 +488,6 @@ RETURN_VALUE: pass MARK_RETURN: - pass # Optional number after PAUSE PAUSE_OPT: