User's Manual

THE
80286
INSTRUCTION SET
STOS/STOSB/STOSW-Store
String Data
Opcode
AA
AS
AA
AS
FLAGS MODIFIED
None
Instruction
STOS mb
STOS mw
STOSS
STOSW
FLAGS UNDEFINED
None
OPERATION
Clocks
3
3
3
3
Description
Store
AL
to byte ES:[OI], advance
01
Store
AX
to word ES:[OI], advance
01
Store
AL
to byte ES:[OI], advance
01
Store
AX
to word ES:[OI], advance
01
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