























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























Move string Store string Load string Scan string Compare string
MOVSB STOSB LODSB SCASB CMPSB
MOVSW STOSW LODSW SCASW CMPSW
MOVSD STOSD LODSD SCASD CMPSD
Move string from one variable to another variable
Store the content of al register to a destination variable
Load a string from source to Al register ( Al register work here as a destination.
Compare contents of destination variable with content of Al register
Compare the contents of source variable to the contents of destination variable
declared
- String db ‘ABCDE ’
A B C D
Destination Source
DI SI
A B C D
memory addresses from left to right.
- DF = 0 => forward (left to right) processing
memory addresses from right to left
- DF = 1 => backward (right to left) processing
given by DS:SI into ES:DI
given by DS:SI into ES:DI
given by DS:SI into ES:DI
Note: the string instructions use DS:SI as the Source
string and ES:DI as the destination string. (For the string instructions, DI references an offset in the ES by default).
Before MOVSB
String 1 H E L L O
SI
offset
0 1 2 3 4
String 2
offset (^5 6 7 8 )
DI
After MOVSB
String 1 H E L L O
SI
offset
0 1 2 3 4
String 2 (^) H E
offset (^5 6 7 8 )
DI
;right to left processing