I have some code that I'd like to turn into a subroutine but can't work out how to do something similar to C pointers to make this possible..
My code at the minute alters the contents of some RAM addresses but is repeated several times for different RAM addresses..
I'd like to do something like
ldx [address of variable]
jsr MySubRoutine
Where the subroutine will can do something like:
stx temp
and then load/read from the original variable with
ld? #temp
st? #temp
right?
Thanks!














