3.4 DIVFP2 (Division (FP2 Compatible))
3.4 DIVFP2 (Division (FP2 Compatible))
Instruction format
DIVFP2.US DT2 DT3
S2 D
R0
DT0
S1i
Operation unit (●: Available)
List of operands
Target data 1 for operation (Device address or constant)
Target data 2 for operation (Device address or constant)
Operation result data (Device address)
Available devices (●: Available)
*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.