]> git.sur5r.net Git - cc65/blobdiff - src/cc65/goto.c
Adjustment for '816
[cc65] / src / cc65 / goto.c
index ae509e643d9a99411d4518a96aa90ef5bd1dab52..1b99a98030c3ecc20fa5aece05e3bf4a9a894894 100644 (file)
@@ -103,7 +103,7 @@ void GotoStatement (void)
 
                 if (CPUIsets[CPU] & CPU_ISET_65SC02) {
                     AddCodeLine ("ldx #$%02X", val * 2);
-                    AddCodeLine ("jmp (%s,x)", arr->AsmName);
+                    AddCodeLine ("jmp (.loword(%s),x)", arr->AsmName);
                 } else {
                     AddCodeLine ("ldy #$%02X", val * 2);
                     AddCodeLine ("lda %s,y", arr->AsmName);
@@ -118,7 +118,7 @@ void GotoStatement (void)
 
                 if (CPUIsets[CPU] & CPU_ISET_65SC02) {
                     AddCodeLine ("tax");
-                    AddCodeLine ("jmp (%s,x)", arr->AsmName);
+                    AddCodeLine ("jmp (.loword(%s),x)", arr->AsmName);
                 } else {
                     AddCodeLine ("tay");
                     AddCodeLine ("lda %s,y", arr->AsmName);