beautypg.com

FUJITSU F2MCTM-16LX User Manual

Page 621

background image

605

APPENDIX B Instructions

Notes:

The execution cycle count found when an overflow occurs in a DIV or DIVW instruction may be a pre-

operation count or a post-operation count depending on the detection timing.

When an overflow occurs with DIV or DIVW instruction, the contents of the AL are destroyed.

See Table B.5-1 and Table B.5-2 for information on (a) to (d) in the table.

Table B.8-7 11 Signed Multiplication/division Instructions (word, long word)

Mnemonic

#

RG

B

Operation

L

H

A
H

I

S

T

N

Z

V

C

R

M
W

DIV

A

2

*1

0

0

word (AH) / byte (AL)
quotient --> byte (AL) remainder --> byte (AH)

Z

-

-

-

-

-

-

*

*

-

DIV

A,ear

2

*2

1

0

word (A) / byte (ear)
quotient --> byte (A) remainder --> byte (ear)

Z

-

-

-

-

-

-

*

*

-

DIV

A,eam

2+

*3

0

*6

word (A) / byte (eam)
quotient --> byte (A) remainder --> byte (eam)

Z

-

-

-

-

-

-

*

*

-

DIVW

A,ear

2

*4

1

0

long (A) / word (ear)
quotient --> word (A) remainder --> word (ear)

-

-

-

-

-

-

-

*

*

-

DIVW

A,eam

2+

*5

0

*7

long (A) / word (eam)
quotient --> word (A) remainder --> word (eam)

-

-

-

-

-

-

-

*

*

-

MUL

A

2

*8

0

0

byte (AH) * byte (AL) --> word (A)

-

-

-

-

-

-

-

-

-

-

MUL

A,ear

2

*9

1

0

byte (A) * byte (ear) --> word (A)

-

-

-

-

-

-

-

-

-

-

MUL

A,eam

2+

*10

0

(b)

byte (A) * byte (eam) --> word (A)

-

-

-

-

-

-

-

-

-

-

MULW

A

2

*11

0

0

word (AH) * word (AL) --> Long (A)

-

-

-

-

-

-

-

-

-

-

MULW

A,ear

2

*12

1

0

word (A) * word (ear) --> Long (A)

-

-

-

-

-

-

-

-

-

-

MULW

A,eam

2+

*13

0

(c)

word (A) * word (eam) --> Long (A)

-

-

-

-

-

-

-

-

-

-

*1: 3: Division by 0, 8 or 18: Overflow, 18: Normal
*2: 4: Division by 0, 11 or 22: Overflow, 23: Normal
*3: 5+(a): Division by 0, 12+(a) or 23+(a): Overflow, 24+(a): Normal
*4: When dividend is positive; 4: Division by 0, 12 or 30: Overflow, 31: Normal
When dividend is negative; 4: Division by 0, 12 or 31: Overflow, 32: Normal
*5: When dividend is positive; 5+(a): Division by 0, 12+(a) or 31+(a): Overflow, 32+(a): Normal
When dividend is negative; 5+(a): Division by 0, 12+(a) or 32+(a): Overflow, 33+(a): Normal
*6: (b): Division by 0 or overflow, 2 x (b): Normal
*7: (c): Division by 0 or overflow, 2 x (c): Normal
*8: 3: Byte (AH) is 0, 12: result is positive, 13: result is negative
*9: 4: Byte (ear) is 0, 13: result is positive, 14: result is negative
*10: 5+(a): Byte (eam) is 0, 14+(a): result is positive, 15+(a): result is negative
*11: 3: Word (AH) is 0, 16: result is positive, 19: result is negative
*12: 4: Word (ear) is 0, 17: result is positive, 20: result is negative
*13: 5+(a): Word (eam) is 0, 18+(a): result is positive, 21+(a): result is negative