OVERVIEW OF THE 80C186 FAMILY ARCHITECTURE

Table 2-5 shows the interpretations of various bit patterns according to number type. Binary num- bers can be 8 or 16 bits long. Decimal numbers are stored in bytes, two digits per byte for packed decimal and one digit per byte for unpacked decimal. The processor assumes that the operands in arithmetic instructions contain data that represents valid numbers for that instruction. Invalid data may produce unpredictable results. The Execution Unit analyzes the results of arithmetic instruc- tions and adjusts status flags accordingly.

Table 2-4. Arithmetic Instructions

Addition

ADD ADC INC AAA DAA

Add byte or word

Add byte or word with carry Increment byte or word by 1 ASCII adjust for addition Decimal adjust for addition

Subtraction

SUB SBB DEC NEG CMP AAS DAS

Subtract byte or word

Subtract byte or word with borrow Decrement byte or word by 1 Negate byte or word

Compare byte or word ASCII adjust for subtraction Decimal adjust for subtraction

Multiplication

MUL IMUL AAM

Multiply byte or word unsigned Integer multiply byte or word ASCII adjust for multiplication

 

Division

 

 

DIV

Divide byte or word unsigned

IDIV

Integer divide byte or word

AAD

ASCII adjust for division

CBW

Convert byte to word

CWD

Convert word to double-word

2-20

Page 49
Image 49
Intel 80C186XL, 80C188XL user manual Addition, Subtraction, Multiplication, Division