to make an assembly routine clearer to read, I want to indicate which of the 2 dptrs are used in each instance. One is fetch, another is store. So, to achieve that, I insert the following:
fptr equ dptr sptr equ dptr
movx a,@fptr mov r7,a inc fptr inc auxr1 movx a,@sptr orl a,r7 movx @sptr,a inc sptr inc auxr1
"inc dptr" is a unique instruction with its own opcode. EQU lets you set values for an address, which winds up turning into an "inc <addr>" instruction. I expect the assembler is unhappy because the equates don't resolve to an actual address. You can equate symbols to A and R0-R7, but not DPTR for some reason. No doubt DPTR's 16-bit width plays into the rationale. The AX51 asssembler has a "LIT" directive that sounds like what you might want: literal text substitution of short strings rather than blocks of code, more like the C #define macro. fptr LIT 'dptr' sptr LIT 'dptr'
"The AX51 asssembler has a "LIT" directive that sounds like what you might want: literal text substitution of short strings rather than blocks of code, more like the C #define macro." Doesn't AX51 handle C-like #define macros? I seem to recall reading about that facility in the manual. Anyway, if it doesn't or if like me, you use A51 (w/o the 'X'), there are a number of "standalone" preprocessors that would do the trick.
Also the current A51 release handles C Macro definitions.
"Also the current A51 release handles C Macro definitions." Excellent! That does what the OP asked for. That'll also take one source translation step out of my builds.