From d283c3243d1f2c9383cca867708b7da06bb0d269 Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Sat, 20 Apr 2019 23:14:45 +0930 Subject: [PATCH] fix first pass size estimation to ensure no ZP modes get used for in-line data --- src/preprocess.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/preprocess.c b/src/preprocess.c index 5a669483..5ec3273b 100644 --- a/src/preprocess.c +++ b/src/preprocess.c @@ -139,7 +139,9 @@ int main(int argc,char **argv) unlink("temp.s"); FILE *out=fopen("temp.s","w"); if (!out) DO_ERROR("Could not write to temp.s"); - fprintf(out,"\t.org 0\n"); + // Start at $100, so that no local data gets accesses using ZP addressing modes during this pass, + // which would otherwise upset things later + fprintf(out,"\t.org $100\n"); for(int i=0;i