INSTRUCTION SET

CPL FO Complement Flag 0 (Not in 8021,8022)

11001101011

The setting of flag 0 is complemented; one is changed to zero, and zero is changed to one.

FO.... NOT (FO)

CPL F1 Complement Flag 1 (Not in 8021,8022)

11011101011

The setting of flag 1 is complemented; one is changed to zero, and zero is changed to one.

(F1)-- NOT (F1)

DA A Decimal Adjust Accumulator

10101 101111

The 8-bit accumulator value is adjusted to form two 4-bit Binary Coded Decimal (BCD) digits following the binary addition of BCD numbers. The carry bit

Cis affected. If the contents of bits 0-3 are greater than nine, or if AC is one, the accumulator is incremented by six.

The four high-order bits are then checked. If bits 4-7 exceed nine, or if C is one, these bits are increased by six. If an overflow occurs, C is

set to one.

I

Example: Assume accumulator contains 10011011.

DA A;ACC ADJUSTED TO 00000001 ;WITH C SET

C AC 7 4 3 0 o 010011011

o 1 1 0 ADD SIX TO BITS 0-7

o

010100001

 

 

o 1

1

0

 

ADD SIX TO BITS 4-7

1

0 0 0

0

0

0 0 0 1

OVERFLOW TO C

DEC A Decrement Accumulator

10000101111

The contents of the accumulator are decremented by one.

(A)__ (A)-1

Mnemonics copyright Intel Corporation 1976.

4·14

Page 87
Image 87
Intel mcs-48 manual DA Aacc Adjusted to 00000001 with C SET, AC 7 4 3 0 o 1 0 ADD SIX to Bits 010100001, Overflow to C