Intel 80C186XL, 80C188XL Instruction Set Descriptions, Table C-4.Instruction Set Continued, C-28

Models: 80C186XL 80C188XL

1 405
Download 405 pages 42.62 Kb
Page 351
Image 351
LODS src-string

INSTRUCTION SET DESCRIPTIONS

Table C-4. Instruction Set (Continued)

Name

Description

Operation

Flags

Affected

 

 

 

 

 

 

 

LODS

Load String (Byte or Word):

When Source Operand is a Byte:

AF –

 

LODS src-string

(AL) (src-string)

CF –

 

DF –

 

Transfers the byte or word string

if

 

IF –

 

(DF) = 0

 

element addressed by SI to register AL

 

OF –

 

then

 

or AX and updates SI to point to the

 

PF –

 

(SI) (SI) + DELTA

 

next element in the string. This

 

SF –

 

else

 

instruction is not ordinarily repeated

 

TF –

 

(SI) (SI) – DELTA

 

since the accumulator would be

 

ZF –

 

 

 

overwritten by each repetition, and

When Source Operand is a Word:

 

 

 

only the last element would be

(AX) (src-string)

 

 

retained.

 

 

if

 

 

 

 

 

Instruction Operands:

(DF) = 0

 

 

LODS src-string

then

 

 

(SI) (SI) + DELTA

 

 

LODS (repeat) src-string

 

 

else

 

 

 

 

 

 

(SI) (SI) – DELTA

 

 

 

 

 

LOOP

Loop:

(CX) (CX) – 1

AF –

 

LOOP disp8

if

CF –

 

(CX) 0

DF –

 

Decrements CX by 1 and transfers

 

then

IF –

 

control to the target location if CX is

 

(IP) (IP) + disp8 (sign-ext to 16 bits)

OF –

 

not 0; otherwise the instruction

 

 

PF –

 

following LOOP is executed.

 

 

 

SF –

 

Instruction Operands:

 

 

 

TF –

 

LOOP short-label

 

ZF –

 

 

 

 

LOOPE

Loop While Equal:

(CX) (CX) – 1

AF –

LOOPZ

Loop While Zero:

if

CF –

 

LOOPE disp8

(ZF) = 1 and (CX) 0

DF –

 

then

IF –

 

LOOPZ disp8

 

(IP)(IP) + disp8 (sign-ext to 16 bits)

OF –

 

Decrements CX by 1 and transfers

 

 

PF –

 

control is to the target location if CX is

 

 

 

SF –

 

not 0 and if ZF is set; otherwise the

 

 

 

TF –

 

next sequential instruction is executed.

 

 

 

ZF –

 

Instruction Operands:

 

 

 

 

 

LOOPE short-label

 

 

 

LOOPZ short-label

 

 

 

 

 

 

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-28

Page 351
Image 351
Intel 80C186XL, 80C188XL Instruction Set Descriptions, Table C-4.Instruction Set Continued, C-28, LODS src-string