It appears the assembler is producing the wrong opcodes for some specific instructions. I certainly might be doing something wrong, but it is hard to see how.
Here is my code, followed by the resulting generated assembly listing shown in the debugger
dbl(*-AR4) = AC3 ------> dbl(*AR4(short(#5))) = AC3
(or in mnemonic) MOV AC3,dbl(*AR4(short(#5)))
I think it is reasonably clear that these do not produce the same functionality.
If I try a different addressing scheme, I get different but equally bad results:
T1 = #2
.
dbl(*(AR4-T1)) = AC3 -----> dbl(*AR4(short(#2))) = AC3
I bring this up because I am pretty sure it is a code generation bug that needs fixing.
The solution, which doesn't really require any more clock cycles is to do:
mar(AR4 - T1)
|| dbl(AR4) = AC3
This produces expected results.