Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 1678

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

STOS/STOSB/STOSW/STOSD—Store String Data
Opcode
AA
AB
AB
AA
AB
AB
Description
Stores a byte, word, or doubleword from the AL, AX, or EAX register, respectively, into
the destination operand. The destination operand is a memory location at the address
ES:EDI. (When the operand-size attribute is 16, the DI register is used as the
source-index register.) The ES segment cannot be overridden with a segment override
prefix.
The STOSB, STOSW, and STOSD mnemonics are synonyms of the byte, word, and
doubleword versions of the STOS instructions. They are simpler to use, but provide no
type or segment checking. (For the STOS instruction, "ES:EDI" must be explicitly
specified in the instruction.)
After the byte, word, or doubleword is transfer from the AL, AX, or EAX register to the
memory location, the EDI register is incremented or decremented automatically
according to the setting of the DF flag in the EFLAGS register. (If the DF flag is 0, the
EDI register is incremented; if the DF flag is 1, the EDI register is decremented.) The
EDI register is incremented or decremented by 1 for byte operations, by 2 for word
operations, or by 4 for doubleword operations.
The STOS, STOSB, STOSW, and STOSD instructions can be preceded by the REP prefix
for block loads of ECX bytes, words, or doublewords. More often, however, these
instructions are used within a LOOP construct, because data needs to be moved into the
AL, AX, or EAX register before it can be stored. See
Repeat String Operation Prefix" on page 4:337
Operation
IF (byte store)
THEN
DEST  AL;
ELSE IF (word store)
THEN
ELSE (* doubleword store *)
4:376
Instruction
STOS ES:(E)DI
STOS ES:DI
STOS ES:EDI
STOSB
STOSW
STOSD
THEN IF DF = 0
THEN (E)DI  1;
ELSE (E)DI  -1;
FI;
DEST  AX;
THEN IF DF = 0
THEN DI  2;
ELSE DI  -2;
FI;
Description
Store AL at address ES:(E)DI
Store AX at address ES:DI
Store EAX at address ES:EDI
Store AL at address ES:(E)DI
Store AX at address ES:DI
Store EAX at address ES:EDI
"REP/REPE/REPZ/REPNE /REPNZ—
for a description of the REP prefix.
Volume 4: Base IA-32 Instruction Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents