beautypg.com

Divuw – NEC 78K/0 Series User Manual

Page 69

background image

69

CHAPTER 5 EXPLANATION OF INSTRUCTIONS

User's Manual U12326EJ4V0UM

Divide Unsigned Word

DIVUW

Unsigned Division of Word Data

[Instruction format]

DIVUW dst

[Operation]

AX (quotient), dst (remainder)

AX

÷

dst

[Operand]

Mnemonic

Operand(dst)

DIVUW

C

[Flag]

Z

AC

CY

[Description]

The AX register contents are divided by the destination operand (dst) contents and the quotient and the

remainder are stored in the AX register and the destination operand (dst), respectively.

Division is executed using the AX register and destination operand (dst) contents as unsigned data.

However, when the destination operand (dst) is 0, the X register contents are stored in the C register and

AX becomes 0FFFFH.

[Description example]

DIVUW C;

The AX register contents are divided by the C register contents and the quotient and the remainder

are stored in the AX register and the C register, respectively.