INSTRUCTION SET DESCRIPTIONS

Table C-4. Instruction Set (Continued)

Name

Description

 

Operation

Flags

 

Affected

 

 

 

 

 

 

 

 

 

CBW

Convert Byte to Word:

if

 

AF –

 

CBW

(AL) < 80H

 

CF –

 

then

 

DF –

 

Extends the sign of the byte in register

 

 

(AH) 0

 

IF –

 

AL throughout register AH. Use to

 

 

else

 

OF –

 

produce a double-length (word)

 

 

(AH) FFH

 

PF –

 

dividend from a byte prior to

 

 

 

 

SF –

 

performing byte division.

 

 

 

 

 

TF –

 

Instruction Operands:

 

 

 

 

 

ZF –

 

none

 

 

 

 

 

 

 

 

CLC

Clear Carry flag:

(CF) 0

 

AF –

 

CLC

 

 

CF ¸

 

Zeroes the carry flag (CF) and affects

 

 

DF –

 

 

 

IF –

 

no other flags. Useful in conjunction

 

 

 

 

 

OF –

 

with the rotate through carry left (RCL)

 

 

 

 

 

PF –

 

and the rotate through carry right

 

 

 

 

 

SF –

 

(RCR) instructions.

 

 

 

 

 

TF –

 

Instruction Operands:

 

 

 

 

 

ZF –

 

none

 

 

 

 

 

 

 

 

CLD

Clear Direction flag:

(DF) 0

 

AF –

 

CLD

 

 

CF –

 

 

 

DF ¸

 

Zeroes the direction flag (DF) causing

 

 

 

 

 

IF –

 

the string instructions to auto-

 

 

 

 

 

OF –

 

increment the source index (SI) and/or

 

 

 

 

 

PF –

 

destination index (DI) registers.

 

 

 

 

 

SF –

 

Instruction Operands:

 

 

 

 

 

TF –

 

none

 

 

ZF –

 

 

 

 

 

NOTE: The three symbols used in the Flags Affected column are defined as follows:

the contents of the flag remain unchanged after the instruction is executed ¸? the contents of the flag is undefined after the instruction is executed

the flag is updated after the instruction is executed

C-8

Page 331
Image 331
Intel 80C186XL, 80C188XL user manual Convert Byte to Word, Clear Carry flag, Clear Direction flag