THE 80286 INSTRUCTION SET

MOVS/MOVSB/MOVSW-Move Data from String to String

Opcode

Instruction

Clocks

Description

A4

MOVS

mb,mb

5

Move byte [SI] to ES:[OI]

A5

MOVS

mW,mw

5

Move word [SI] to ES:[OI]

A4

MOVS8

5

Move byte OS:[SI] to ES:[OI]

A5

MOVSW

5

Move word OS:[SI] to ES:[OI]

FLAGS MODIFIED

None

FLAGS UNDEFINED

None

OPERATION

MOYS copies the byte or word at [Sl]to the byte or word at ES:[DI). The destination operand must be addressable from the ESregister; no segment override is possible. A segment override may be used for the source operand.

After the data movement is made, both SI and DI are automatically advanced. If the direction flag is o (CLD was executed), the registers increment; if the direction flag is 1 (STD was executed), the registers decrement. The. registers increment or decrement by 1 if a byte was moved; by 2 if a word was moved.

MOYS can be preceded by the REP prefix for block movement of CX bytes or words. Refer to the REP instruction for details of this operation.

PROTECTED MODE EXCEPTIONS

#GP(O) if the destination is in a non-writable segment. #GP(O) for an illegal memory operand effective address in the CS, DS, or ES segments; #SS(O) for an illegal address in the SS segment.

REAL ADDRESS MODE EXCEPTIONS

Interrupt 13 for a word operand at offset OFFFFH.

8-75

Page 285
Image 285
Intel 80286, 80287 manual MOVS/MOVSB/MOVSW-Move Data from String to String, MOVS8, Movsw