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
I wonder why you would call a search within a subroutine a global one. To me, the latter would mean a project-wide search over all source files. With a dual dptr, I have a 2000 line module in assembler where the only change of the dptr is flipping AUXR1. You should consider yourself a lucky person, then. More often than not, I have to juggle around with about 4 pointers... Even so, I really don't see what you're trying to achieve that a 4-macro (or maybe two-macros-with-parameters) solutions can't handle elegantly. A macro that actually checks/sets AUXR is certainly better than your proposal, which only documents which of the two DPTRs a given instruction is meant to use, but doesn't actually ensure that that's the one it does use. I.e. your sptr/fptr idea may well make things worse instead of better by spreading a false impression. If you want more mnemonic meanings, you could always call them R_FPTR and W_FPTR and so on, too.