Code: Select all
sof 0, -0.5
wrax reg0, 0 ; reg0 = -0.5
sof 0, -1
wrax reg1,0 ; reg1 = -1
ldax reg0 ; acc = -0.5
rdax reg1, -2 ; acc = -0.5 + (reg1*-2)
wrax reg2, 0 ; reg2 = acc
On one hand you could think that -0.5 + (-1*-2) = 1.5 which would be clipped to 1 (max positive acc value).
But on the other hand you could think that the content of (-1*-2) would be clipped before being added with -0.5 which would yield an answer of 0.5.
I know I can test this by outputing the result to one of the DACs, but I'm currently away from my workshop.