I'm pretty sure on this I have a certain sequence and a circular buffer pointer will go outside of the range limit. I looked at some errat sheets but I didn't see this listed.
A "C" program will call an ASM routine. The C program passes a structure of the form
struct {
long ArrayPtr;
long Arrary[256];
};
Here is the problem ASM code and the above structure is passed in AR1.
1: OR #0002h,mmap(ST2_55) ; enable AR1 for circular
2: MOV dbl(*AR1+),AC0 ; This reads the index from the above struture and now AR1 points to Array[0]. For me AR1=0x146DA
3: mov mmap(AR1),BSA01 ; set the cirular base address
4: Mov #512,BK03 ; length of the circular addressing
5: MOV dbl(*AR1+),AC1 ; Now look at AR1 and it's 0x144DC so it subtracted 512 and added 2 and it's out of range of 0x146DA + 512.
It looks like at line 2 it sets a trigger to tell it to do the 512 subtraction. Then at line 5 when it increment AR1+ it's subtracting 512 and adding 2. AR1 should be 0x146DC but it's 0x144DC.
My expectaion was that it only does the check with a *AR1+.
Also when this happens BSA01=0 and BK03=0 before they are changed at lines 3 and 4 but I'm not sure that makes a difference.