From 74a22621574a401abf93b21c40777b9075601ef2 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Fri, 27 Jun 2025 17:26:11 +0200 Subject: [PATCH 1/3] hotfix --- asminc/zeropage.inc | 8 ++++++++ libsrc/runtime/sp-compat.s | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/asminc/zeropage.inc b/asminc/zeropage.inc index 2d4b144db..8d508fc5a 100644 --- a/asminc/zeropage.inc +++ b/asminc/zeropage.inc @@ -13,10 +13,18 @@ .globalzp tmp1, tmp2, tmp3, tmp4 .globalzp regbank +; FIXME: there must be a less ugly way to do this +.ifp4510 +.else +.ifp45GS02 +.else + ; The following symbol is supplied for compatibility reasons only, it ; will get removed in future versions. Using it will cause a linker ; warning. .globalzp sp +.endif +.endif ; The size of the register bank diff --git a/libsrc/runtime/sp-compat.s b/libsrc/runtime/sp-compat.s index 797fef47b..77972212f 100644 --- a/libsrc/runtime/sp-compat.s +++ b/libsrc/runtime/sp-compat.s @@ -5,7 +5,15 @@ ; linker warning if it is used. Added after renaming "sp" to "c_sp". ; +; FIXME: there must be a less ugly way to do this +.ifp4510 +.else +.ifp45GS02 +.else + .include "zeropage.inc" .export sp := c_sp .assert 0, ldwarning, "Symbol 'sp' is deprecated - please use 'c_sp' instead" +.endif +.endif From 0d28f6ff8c9e049fc24e047db2f4ee4ff5872e4a Mon Sep 17 00:00:00 2001 From: mrdudz Date: Fri, 27 Jun 2025 17:32:20 +0200 Subject: [PATCH 2/3] fix test --- test/asm/listing/080-sp-compat.s | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/asm/listing/080-sp-compat.s b/test/asm/listing/080-sp-compat.s index 8c22a71d3..54c48e8c3 100644 --- a/test/asm/listing/080-sp-compat.s +++ b/test/asm/listing/080-sp-compat.s @@ -1,7 +1,16 @@ .include "zeropage.inc" +; FIXME: there must be a less ugly way to do this +.ifp4510 +.else +.ifp45GS02 +.else + .proc _func ldy #0 lda (sp),y rts .endproc + +.endif +.endif From 0a5211dcaa4d1825ed38f97afc1d162850c934c6 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Fri, 27 Jun 2025 17:39:04 +0200 Subject: [PATCH 3/3] ...and the reference for the test --- test/asm/listing/ref/080-sp-compat.ld65err2-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/asm/listing/ref/080-sp-compat.ld65err2-ref b/test/asm/listing/ref/080-sp-compat.ld65err2-ref index fe2611088..78935d2b3 100644 --- a/test/asm/listing/ref/080-sp-compat.ld65err2-ref +++ b/test/asm/listing/ref/080-sp-compat.ld65err2-ref @@ -1 +1 @@ -ld65: Warning: runtime/sp-compat.s:10: Symbol 'sp' is deprecated - please use 'c_sp' instead +ld65: Warning: runtime/sp-compat.s:16: Symbol 'sp' is deprecated - please use 'c_sp' instead