I am programming a 5509A using CCS4 w/ CodeGenTools v4.3.5 and DSP/BIOS v5.41.
I have an assembly function that is using the accumulator to accumulate SQA results with the accumulator in 40 bit mode.
MOV *(#_I_read_ptr + 1), AR1 ; AR1 points to 1st data point.
MOV *AR1+ << #16, AC1 ; Load first data point to AC1(32-16).
RPT *(#_UI_Repeats) ; Repeat (_UI_Repeats + 1) times.
SQA AC1, AC0 ; Load value pointed to by AR1 into AC1, square
|| MOV *AR1+ << #16, AC1 ; the value, accumulate in AC0.
When I am finished I need to move the accumulated results into memory. I am having trouble finding the correct way to get all 40 bits out of the accumulator. I have tried moving them into a 40-bit signed integer, but it doesn't load properly. Is it necessary to shift different parts out of the accumulator them reconstitute them in a 40-bit signed int?
Any suggestions?