Div1 (Main Process Of Division) - 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.40

DIV1 (Main Process of Division)

This instruction is used in unsigned division. It should be used in combination such as
DIV0U and DIV1 x 32.
■ DIV1 (Main Process of Division)
Assembler format:
DIV1 Ri
Operation:
{MDH, MDL} < < = 1
if (D1 = = 1) {
}
else {
}
if ((D0 eor D1 eor C) = = 0) {
}
Flag change:
N and V: Unchanged
Z: Set when the result of step division is "0", cleared otherwise. Set according to remainder of
C: Set when the operation result of step division involves a carry operation, cleared otherwise.
Execution cycles:
d cycle(s)
Normally executed within one cycle. However, a 2-cycle interlock is applied if the instruction
immediately after is one of the following: MOV MDH, Ri / MOV MDL,
Ri / ST Rs, @-R15.
Rs : dedicated register (TBR, RP, USP, SSP, MDH, MDL)
Instruction format:
132
MDH + Ri → temp
MDH – Ri → temp
temp → MDH
1 → MDL [0]
N
Z
V
C
C
C
division results, not according to quotient.
MSB
1
0
0
1
0
1
1
1
0
1
LSB
1
0
Ri

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fr series

Table of Contents