Renesas R8C/Tiny Series Software Manual page 126

16-bit single-chip microcomputer
Hide thumbs Also See for R8C/Tiny Series:
Table of Contents

Advertisement

Chapter 3
Functions
RMPA
[ Syntax ]
RMPA.size
*1
[ Operation ]
Repeat
R2R0(R0)
A0
A1
R3
Until
R3 = 0
*1
If you set a value 0 in R3, this instruction is ingored.
*2
Shown in ( )
[ Function ]
• This instruction performs sum-of-product calculations, with the multiplicand address indicated by A0, the multi-
plier address indicated by A1, and the count of operation indicated by R3. Calculations are performed including
the sign bits and the result is stored in R2R0 (R0)
• If an overflow occurs during operation, the O flag is set to terminate the operation. R2R0 (R0)
contains the result of the addition performed last. A0, A1 and R3 are indeterminate.
• The content of the A0 or A1 when the instruction is completed indicates the next address of the last-
read data.
• If an interrupt request is received during instruction execution, the interrupt is acknowledged after a sum-of-
product addition is completed (i.e., after the content of R3 is decremented by 1).
• Make sure that R2R0 (R0)
*1
Shown in ( )
applies when (.B) is selected for the size specifier (.size).
[ Fl ag Change ]
Flag
U
I
O
Change
Conditions
O :
The flag is set when +2147483647 (.W) or –2147483648 (.W), or +32767 (.B) or –32768 (.B) is
exceeded during operation; otherwise cleared.
[ Description Example ]
RMPA.B
Calculate sum-of-products
Repeat MultiPle & Addition
*2
R2R0(R0)
A0
+
2 (1)
A1
+
2 (1)
R3
1
*2
applies when (.B) is selected for the size specifier (.size).
*1
has the initial value set.
B
S
Z
D
C
[ Instruction Code/Number of Cycles ]
B , W
*2
+
M(A0)
M(A1)
*2
*2
*1
.
109
3.2
Functions
RMPA
Page=218
*1

Advertisement

Table of Contents
loading

Table of Contents