divq


Division of (signed) word data (variable steps) (Divide Word Quickly)

[Syntax]

-

divq reg1, reg2, reg3

[Function]

Divides the word data in general-purpose register reg2 by the word data in general-purpose register reg1, stores the quotient in reg2, and stores the remainder in general-purpose register reg3. General-purpose register reg1 is not affected.

The minimum number of steps required for division is determined from the values in reg1 and reg2, then this operation is executed.

When division by zero occurs, an overflow results and all operation results except for the OV flag are undefined.

[Description]

-

The assembler generates one divq machine instruction.

[Flag]

CY

---

OV

"1" when overflow occurs; otherwise, "0"

S

"1" when operation result quotient is a negative value; otherwise, "0"

Z

"1" when operation result quotient is a "0"; otherwise, "0"

SAT

---