Closed anrikun closed 2 years ago
you may use a proximity alias
ld a,0 : .myval equ $-1 ld hl,.myval
advantage is that you could use .myval before it's declared
Wow, great solution! Thank you for your help as always, Edouard.
Actually there are downsides to all solutions so far:
Placeholder does not get a real label so it doesn't show up as a symbol when debugging with Winape.
I end up with
ld (#08AD),a
instead of
ld (.myval),a
I've found another workaround:
org $+1 : .myval : org $-1
ld a,0
Not very easy to read but it works...
Currently this is how I give a label to a placeholder (self-modifying code):
The problem is that myval here is not a proximity label but a global variable. I would like to give a proximity label to my placeholder.
Obviously I could do something like:
or
But none of these solutions satisfies me.
Maybe there's a way to do what I want but I couldn't figure it out. Any idea?