cision values and accumulated using regular MAC instructions. Note that the maximum
number of single times double MAC operations in this algorithm are limited to 255 since
overflow may occur (the A2 register is just eight bits long). If a longer sequence is
required, it should be split into sub-sequences each with no more than 255 MAC opera-
tions.
R1
R0
move
clr a
ori
#$40,mr
move
rep
#N
mac
x0,y1,a
andi
#$bf,mr
move
move
move
move
rep
#N
mac
x0,y1,a
move
a,l:(r0)+
Figure 3-13 Single
3 - 18
DOUBLE PRECISION MULTIPLY MODE
X:
MSPi
LSPi
DP3
DP1
∑
DP3_DP2_DP1 =
#N-1,m5
#0,y0
x:(r1)+,x0
y:(r5)+,y1
x:(r1)+,x0
y:(r5)+,y1
a0,x:(r0)+
a1,y0
a2,a
y0,a0
x:(r1)+,x0
y:(r5)+,y1
×
Double Multiply-Accumulate Algorithm
DATA ARITHMETIC LOGIC UNIT
Y:
SPi
DP2
MSPi_LSPi x SPi
;clear a and y0
;enter DP mode
;load LSPi and SPi
;0<N<256
;LSPi*SPi
;exit DP mode
;save DP1
;a2:a1
;load MSPi and SPi
;save DP3_DP2
R5
R0
a
a1:a0
MOTOROLA