MSM80C154S/83C154S/85C154HVS

29. DA A (Decimal adjust accumulator)

 

 

7

 

 

 

 

 

 

 

0

Instruction code

:

1

1

0

1

 

0

1

0

0

Operations

:

100+6(AC)=1 or 100>10

 

 

 

 

 

101+6

}(C)=1 or 101>10

 

 

 

 

 

(C)1

 

 

 

Byte 1

Number of bytes

: 1

 

 

 

 

 

 

 

 

Number of cycles

: 1

 

 

 

 

 

 

 

 

Flags

: C AC F0 RS1 RS0 OV F1

P

 

 

 

 

 

 

 

 

 

 

(PSW)

 

 

 

 

 

 

 

 

Description

 

 

 

 

 

 

 

 

 

 

: The arithmetic operation result located in the accumulator

following an addition between two 2-digit decimal number is converted to a normal decimal number. When the contents of accumulator bits 0 thru 3 (100 digit) are greater than 9, or when the auxiliary carry (AC) is 1, 6 is added to accumulator bits 0 thru 3. And if the contents of accumulator bits 4 thru 7 (101 digit) exceed 9, or if the result obtained by adding a carry from the lower order digits after compensation is greater than 9, or if the carry flag is 1, 6 is added to the data in accumulator bits 4 thru 7. The flags are also updated.

278

Page 285
Image 285
Sonic Alert msm83c154s, msm80154s, msm85c154hvs user manual MSM80C154S/83C154S/85C154HVS DA a Decimal adjust accumulator, 278