Number of bytes Number of cycles Flags
(PSW) Description

MSM80C154S/83C154S/85C154HVS

34. DIV AB (Divide accumulator by B)

 

 

7

 

 

 

 

 

 

 

0

Instruction code

:

1

0

0

0

 

0

1

0

0

Operation

:

(A) quotient(A)/(B)

 

 

 

 

 

(B) remainder

:1

:4

: C

AC F0 RS1 RS0 OV F1

P

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Byte 1

:The accumulator contents are devided by the contents of arithmetic operation register (B). The two data values are handled as integers without sign. The quotient is placed in the accumulator, and the remainder in the arithmetic operation register (B). The carry flag is always cleared, and the overflow flag (OV) is set to 1 if division by 0 is executed. This flag is cleared in all other cases. If division by 0 is executed, the accumulator and arithmetic operation register (B) contents remain unchanged.

Example DIV AB(0AEH÷7H=18…………remainder 6H)

 

 

 

7

 

 

 

0

 

Instruction code

:

1

0 0 0

 

0 1 0

0

Byte 1

Before execution Accumulator

1 0 1 0 1 1 1 0

70 B register

0 0 0 0 0 1 1 1

70

After execution Accumulator

0 0 0 1 1 0 0 0

70 B register

0 0 0 0 0 1 1 0

70

284

Page 291
Image 291
Sonic Alert msm83c154s, msm80154s MSM80C154S/83C154S/85C154HVS DIV AB Divide accumulator by B, 284, AC F0 RS1 RS0 OV F1