Intel 80286, 80287 manual Stoss, Stosw

Models: 80287 80286

1 515
Download 515 pages 45.04 Kb
Page 317
Image 317

THE 80286 INSTRUCTION SET

STOS/STOSB/STOSW-Store String Data

Opcode

Instruction

Clocks

Description

AA

STOS

mb

3

Store AL to byte ES:[OI], advance 01

AS

STOS

mw

3

Store AX to word ES:[OI], advance 01

AA

STOSS

3

Store AL to byte ES:[OI], advance 01

AS

STOSW

3

Store AX to word ES:[OI], advance 01

FLAGS MODIFIED

None

FLAGS UNDEFINED

None

OPERATION

STOS transfers the contents the AL or AX register to the memory byte or word at ES:DI. The operand must be addressable from the ES register; no segment override is possible.

After the transfer is made, DI is automatically advanced. If the direction flag is 0 (CLD was executed), DI increments; if the direction flag is 1 (STD was executed), DI decrements. DI increments or decre- ments by 1 if a byte was moved; by 2 if a word was moved.

STOS can be preceded by the REP prefix for a block fill 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.

S-107

Page 317
Image 317
Intel 80286, 80287 manual Stoss, Stosw