diff --git a/src/alloc.asm b/src/alloc.asm index 8dae0e3..c3bc6bf 100644 --- a/src/alloc.asm +++ b/src/alloc.asm @@ -150,11 +150,13 @@ loop: sty alloc_size iny sty alloc_size+1 - jmp add_pointers + bne add_pointers .endproc ; Increase program memory area by A (size in bytes) .proc alloc_prog + .importzp opos + lda opos ; Move from "prog_end", up by "alloc_size" ldx #prog_end - mem_start jsr alloc_area_8 diff --git a/src/parse.asm b/src/parse.asm index 2bf099a..cc763ef 100644 --- a/src/parse.asm +++ b/src/parse.asm @@ -134,7 +134,6 @@ ok_loop: bne parser_error ok: lda #TOK_END jsr emit_const - lda opos jsr alloc_prog clc bcc restore_stack ; exit @@ -341,7 +340,6 @@ pexit_ok: bne set_parse_error line_ok: ; Increases output buffer - lda opos jsr alloc_prog jmp parse_line