Multiply and Accumulate Previous Product
MPYA
7-117
Assembly Language Instructions
Cycles for a Repeat (RPT) Execution of an MPYA Instruction
Program
Operand
ROM
DARAM
SARAM
External
DARAM
n
n
n
n+p
SARAM
n
n
n, n+1
†
n+p
External
n+nd
n+nd
n+nd
n+1+p+nd
† If the operand and the code are in the same SARAM block
Example 1
MPYA
DAT13
;(DP = 6, PM = 0)
Before Instruction
After Instruction
Data Memory
Data Memory
30Dh
7h
30Dh
7h
TREG
6h
TREG
6h
PREG
36h
PREG
2Ah
ACC X
54h
ACC
0
8Ah
C
C
Example 2
MPYA
*,AR4
;(PM = 0)
Before Instruction
After Instruction
ARP
3
ARP
4
AR3
30Dh
AR3
30Dh
Data Memory
Data Memory
30Dh
7h
30Dh
7h
TREG
6h
TREG
6h
PREG
36h
PREG
2Ah
ACC X
54h
ACC
0
8Ah
C
C