Multiply and Subtract Previous Product
MPYS
7-119
Assembly Language Instructions
Cycles for a Repeat (RPT) Execution of an MPYS 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
MPYS
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
1
1Eh
C
C
Example 2
MPYS
*,AR5
;(PM = 0)
Before Instruction
After Instruction
ARP
4
ARP
5
AR4
30Dh
AR4
30Dh
Data Memory
Data Memory
30Dh
7h
30Dh
7h
TREG
6h
TREG
6h
PREG
36h
PREG
2Ah
ACC X
54h
ACC
1
1Eh
C
C