3.4
DIVFP2 (Division (FP2 Compatible))
3-7
3.4 DIVFP2 (Division (FP2 Compatible))
Instruction format
DIVFP2.US
DT2
DT3
S2
D
R0
DT0
S1
i
Operation unit (
●
: Available)
Operation unit
bit
US
SS
UL
SL
SF
DF
i
●
●
●
●
List of operands
Operand
Description
S1
Target data 1 for operation (Device address or constant)
S2
Target data 2 for operation (Device address or constant)
D
Operation result data (Device address)
Available devices (
●
: Available)
Operand
16-bit device
32-bit device
*1
Integer
Real
number
String
Index
modifier
*2
WX WY WR WL WS SD DT LD UM WI WO
TS
CS
TE
CE
IX
*3
K
*4
U
*5
H
*6
SF DF
" "
S1
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
S2
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
●
D
●
●
●
●
●
●
●
●
●
●
●
●
*1:
Cannot be specified when the operation unit is 16-bit integer (SS, US).
*2:
Only 16-bit deivces, 32-bit devices, and integer constants can be modified. (Real number constants and character
constants cannot be specified.)
*3:
Index registers (I0 to IE)
*4:
Can be specified only when the operation unit is signed integer (SS, SL).
*5:
Can be specified only when the operation unit is unsigned integer (US, UL).
*6:
Can be specified only when the operation unit is integer (US, SS, UL, SL).
Outline of operation
Divides [S1] by the value of [S2] according to the operation unit of [i], and sets the quotient in
[D] and the remainder in the system register (SD).
Operation results are stored as follows according to operation units.
US, SS : (S1) / (S2) -> Quotient (D), Remainder (SD15)
UL, SL : (S1+1, S1) / (S2+1, S2) -> Quotient (D+1, D), Remainder (SD16, SD15)
When an interrupt PB and interrupt program (INTPG) occur, SD15 and SD16 are
automatically saved and restored.
Therefore, even when this instruction is used during an interrupt program, SD15 and SD16
are not damaged.
However, when using this instruction during an interrupt program, the use of SD15 and
SD16 must be finished before the completion of the interrupt program.
Summary of Contents for FP7 Series
Page 1: ...FP7 CPU Unit Ver 4 20 Additional Functions Manual 12 21 2015...
Page 3: ...1 Introduction of Ver 4 20...
Page 6: ......
Page 7: ...2 Basic Instructions...
Page 17: ...3 High level Instructions...
Page 29: ...4 FP2 FP2SH Program Conversion Function...
Page 36: ......
Page 37: ...5 MEWTOCOL COM...