Rmpa - Renesas R8C/Tiny Series Software Manual

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

Advertisement

Chapter 3
Functions

RMPA

[ Syntax ]
RMPA.size
[ Operation ]
*1
Repeat
R2R0(R0)
A0
A1
R3
Until
R3 = 0
*1
If R3 is set to 0, this instruction is ignored.
*2
Items in parentheses and followed by
fier (.size).
[ 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 undefined.
• The content of A0 or A1 when the instruction is completed indicates the next address after 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)
Items in parentheses and followed by
[ 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
Rev.2.00 Oct 17, 2005
REJ09B0001-0200
Calculate sum-of-products
Repeat MultiPle and Addition
*2
R2R0(R0)
A0
+
A1
+
R3
*1
is set to the initial value.
"*1"
B
S
Z
D
C
page 109 of 263
[ Instruction Code/Number of Cycles ]
B , W
*2
+
M(A0)
M(A1)
2 (1)
*2
2 (1)
*2
1
"*2"
*2
( )
apply when (.B) is selected as the size speci-
*1
.
*1
( )
apply when (.B) is selected as the size specifier (.size).
3.2
Functions
RMPA
Page: 218
*1

Advertisement

Table of Contents
loading

Table of Contents