]> Shamusworld >> Repos - rmac/blobdiff - sect.c
6502 mode: fix clearing of its RAM space with each .6502 invocation. Also fixed chptr...
[rmac] / sect.c
diff --git a/sect.c b/sect.c
index 7a88a5610693f2271e5154f75aab471d0b0bf887..cbb15187fa8f6514af7386463d1f1ac1b128e99f 100644 (file)
--- a/sect.c
+++ b/sect.c
@@ -130,6 +130,11 @@ void SwitchSection(int sno)
                challoc = cp->challoc;
                ch_size = cp->ch_size;
                chptr = cp->chptr + ch_size;
+        if (m6502)
+        {
+            // For 6502 mode, add the last org'd address
+            chptr = cp->chptr + orgaddr;
+        }
        }
        else
                challoc = ch_size = 0;