(also posted to *.)
I'm thinking of writing a new ROM. This ROM will require workspace memory. What I would like to do is have the ROM autodetect if it's running from SWR, and if so then use memory from &B800 (for example) else use the standard service calls to reserve memory. The detection code is simple enough, but what I don't know is how to _efficiently_ access the memory.
For example, what would be the best equivalent of
Code:
ORG &E00
myvar1 DS 1
myvar2 DS 1
myvar3 DS 1
ORG &8000
....
LDA myvar1
STA myvar2
...
I can no longer refer to myvar1/2/3 in absolute terms, yet setting up an indirection each and every time I need to access a variable (and preserving a register since the 6502 doesn't have a (zp) address mode) seems painful.
Is there a better way?