SPRUI04F july 2015 – april 2023
Lmac: .cproc A4,B4
.reg t0,t1,p,i,sh:sl
MVK 100,i
ZERO sh
ZERO sl
loop: .trip 100
LDH *a4++, t0 ; t0 = a[i]
LDH *b4++, t1 ; t1 = b[i]
MPY t0,t1,p ; prod = t0 * t1
ADD p,sh:sl,sh:sl ; sum += prod
[I] ADD -1,i,i ; --I
[I] B loop ; if (I) goto loop
.return sh:sl
.endproc