CHAPTER 7 DETAILED EXECUTION INSTRUCTIONS
7.42
DIV3 (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.
■ DIV3 (Correction when Remainder is 0)
Assembler format:
DIV3
Operation:
if (Z = = 1) {
}
Flag change:
N, Z, V, and C: Unchanged
Execution cycles:
1 cycle
Instruction format:
Example:
DIV3
136
MDL + 1 → MDL
N
Z
V
C
–
–
–
–
MSB
1
0
0
1
Instruction bit pattern : 1001 1111 0110 0000
R2
0 0 F F F F F F
MDH
0 0 0 0
0 0 0 0
MDL
0 0 0 0 0 0 0 F
D1 D0 T
SCR
0 0 0
N Z V C
CCR
0 1 0 0
Before execution
1
1
1
1
0
1
LSB
1
0
0
0
0
0
R2
0 0 F F F F F F
MDH
0 0 0 0 0 0 0 0
MDL
0 0 0 0 0 0 1 0
D1 D0 T
SCR
N Z V C
CCR
0 1 0 0
After execution
0 0 0