Div2 (Correction When Remainder Is 0) - Fujitsu FR Family Instruction Manual

32-bit microcontroller
Hide thumbs Also See for FR Family:
Table of Contents

Advertisement

CHAPTER 7 DETAILED EXECUTION INSTRUCTIONS
7.41

DIV2 (Correction when Remainder is 0)

This instruction is used in signed division. It should be used in combinations such as
DIV0S, DIV1 x 32, DIV2, DIV3 and DIV4S.
■ DIV2 (Correction when Remainder is 0)
Assembler format:
DIV2 Ri
Operation:
if (D1 = = 1) {
}
else {
}
if (Z == 1) {
}
Flag change:
N and V: Unchanged
Z: Set when the operation result of stepwise division is "0", cleared otherwise. Set according to
C: Set when the result of stepwise division involves a carry or borrow operation, cleared otherwise.
Execution cycles:
1 cycle
Instruction format:
134
MDH + Ri → temp
MDH – Ri → temp
0 → MDH
N
Z
V
C
C
C
remainder of division results, not according to quotient.
MSB
1
0
0
1
0
1
1
1
0
1
LSB
1
1
Ri

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fr series

Table of Contents