All Intel string op mnemonics default to long.
movs{bwl} movs{bwl} m[8|16|32], reg[16|32]
move {bwl} [(E)SI] -> ES: (E)DI]
move {bwl} DS: [(E)SI] -> ES: [(E)DI]
Copies the byte, word, or long in [(E)SI] to the byte, word, or long in ES:[(E)DI}. Before executing the move instruction, load the index values into the SI source- and DI destination-index registers.
The destination operand must be addressable from the ES register; it cannot span segments. A source operand, however, can span segments; the default is DS.
After the data is moved, both the source- and destination-index registers are automatically incremented or decremented as determined by the value of the direction flag (DF). The index registers are incremented if DF = 0 (DF cleared by a cld instruction); they are decremented if DF = 1 (DF set by a std instruction). The increment/decrement count is 1 for a byte move, 2 for a word, and 4 for a long.
For a block move of CX bytes or words, precede a movs instruction with a rep prefix.
Copy the 8-bit byte from the DS:[(E)SI] to the ES:[(E)DI] register.
movsb
cmps{bwl}
compare DS:[(E)SI] with ES:[(E)DI]
Compares the byte, word, or long in DS:[(E)SI] with the byte, word, or long in ES:[(E)DI}. Before executing the cmps instruction, load the index values into the SI source- and DI destination-index registers.
cmps subtracts the operand indexed by the destination-index from the operand indexed by the source-index register.
After the data is compared, both the source- and destination-index registers are automatically incremented or decremented as determined by the value of the direction flag (DF). The index registers are incremented if DF = 0 (DF cleared by a cld instruction); they are decremented if DF = 1 (DF set by a std instruction). The increment/decrement count is 1 for a byte move, 2 for a word, and 4 for a long.
For a block compare of CX or ECX bytes, words or longs, precede a cmps instruction with a repz or repnz prefix.
Compare the 8-bit byte in the DS:[(E)SI] register to the ES:[(E)DI] register.
cmpsb
Compare the 16-bit word in the DS:[(E)SI] register to the ES:[(E)DI] register.
cmpsw
Compare the 32-bit word in the DS:[(E)SI] register to the ES:[(E)DI] register.
cmpsl
stos{bwl}
store [AL|AX|EAX] -> ES:[(E)DI]
Transfers the contents of the AL, AX, or EAX register to the memory byte or word addressed in the destination register relative to the ES segment. Before executing the move instruction, load the index values into the DI destination-index register.
The destination operand must be addressable from the ES register; it cannot span segments.
After the data is transferred, the destination-index register is automatically incremented or decremented as determined by the value of the direction flag (DF). The index registers are incremented if DF = 0 (DF cleared by a cld instruction); they are decremented if DF = 1 (DF set by a std instruction). The increment/decrement count is 1 for a byte move, 2 for a word, and 4 for a long.
For a block transfer of CX bytes, words or longs, precede a stos instruction with a rep prefix.
Transfer the contents of the AL register to the memory byte addressed in the destination register, relative to the ES segment.
stosb
Transfer the contents of the AX register to the memory word addressed in the destination register, relative to the ES segment
stosw
Transfer the contents of the EAX register to the memory double-word addressed in the destination register, relative to the ES segment
stosl
lods{bwl}
load ES:[(E)DI] -> [AL|AX|EAX]
Loads the memory byte or word addressed in the destination register into the AL, AX, or EAX register. Before executing the lods instruction, load the index values into the SI source-index register.
After the data is loaded, the source-index register is automatically incremented or decremented as determined by the value of the direction flag (DF). The index register is incremented if DF = 0 (DF cleared by a cld instruction); it is decremented if DF = 1 (DF set by a std instruction). The increment/decrement count is 1 for a byte move, 2 for a word, and 4 for a long.
For a block transfer of CX bytes, words or longs, precede a lods instruction with a rep prefix; however, lods is used more typically within a loop construct where further processing of the data moved into AL, AX, or EAX is usually required.
Load the memory byte addressed in the destination register, relative to the ES segment register, into the AL register.
lodsb
Load the memory word addressed in the destination register, relative to the ES segment register, into the AX register.
lodsw
Load the memory double-word addressed in the destination register, relative to the ES segment register, into the EAX register.
lodsl
scas{bwl}
compare ES:[(E)DI] with [AL|AX|EAX]
Compares the memory byte or word addressed in the destination register relative to the ES segment with the contents of the AL, AX, or EAX register. The result is discarded; only the flags are set.
Before executing the scas instruction, load the index values into the DI destination-index register. The destination operand must be addressable from the ES register; it cannot span segments.
After the data is transferred, the destination-index register is automatically incremented or decremented as determined by the value of the direction flag (DF). The index registers are incremented if DF = 0 (DF cleared by a cld instruction); they are decremented if DF = 1 (DF set by a std instruction). The increment/decrement count is 1 for a byte move, 2 for a word, and 4 for a long.
For a block search of CX or ECX bytes, words or longs, precede a scas instruction with a repz or repnz prefix.
Compare the memory byte addressed in the destination register, relative to the ES segment, with the contents of the AL register.
scasb
Compare the memory word addressed in the destination register, relative to the ES segment, with the contents of the AX register
scasw
Compare the memory byte double-word addressed in the destination register, relative to the ES segment, with the contents of the EAX register
scasl
xlat
set AL to DS:[(E)BX + unsigned AL]
Changes the AL register from the table index to the table entry. AL should be the unsigned index into a table addressed by DS:BX (16-bit address) or DS:EBX (32-bit address).
Change the AL register from the table index to the table entry.
xlat
rep; repnz; repz;
repeat string-operation until tested-condition
Use the rep (repeat while equal), repnz (repeat while nonzero) or repz (repeat while zero) prefixes in conjunction with string operations. Each prefix causes the associated string instruction to repeat until the count register (CX) or the zero flag (ZF) matches a tested condition.
Repeat while equal: Copy the 8-bit byte from the DS:[(E)SI] to the ES:[(E)DI] register.
rep; movsb
Repeat while not zero: Compare the memory byte double-word addressed in the destination register EDL, relative to the ES segment, with the contents of the EAX register.
repnz; scasl
Repeat while zero:Transfer the contents of the EAX register to the memory double-word addressed in the destination register EDL, relative to the ES segment.
repz; stosl