136
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) {
MDL + 1 MDL
}
Flag change:
N, Z, V, and C: Unchanged
Execution cycles: 1 cycle
Instruction format:
Example: DIV3
NZVC
––––
MSB LSB
1001111101100000
MDH
MDL
D1 D0 T
SCR SCR
D1 D0 T
000000
R2
00FF FFFF
MDH
MDL
R2
0000 0010
0000 0000
0000 000F
0000 0000
00FF FFFF
NZVC
CCR CCR
NZVC
01000100
Before execution After execution

Instruction bit pattern : 1001 1111 0110 0000