Professional Documents
Culture Documents
For example
Now further,
If the string inst. is a byte string opration, the index is updated by one.
1)...REPE/REPZ
For repeat instruction while equal/zero.
2)...REPNE/REPNZ
The starting byte of the source string is located in memory location whose
address may be computed by SOURCE INDEX or DATA SAGMENT.
The string address of destination locations where this string has be relocated
is given by DESTINATOIN INDEX or EXTRA SEGMENT.
10H*DS+[SI],
REP MOVSB ; Move 0FFH string bytes from source address to destination
CMPS: Compare String Byte or String Word
The CMPS inst. can be use to compare two strings of bytes or words.
If both the byte or word strings are equal, zero flag is set.
And more to the DS: SI and ES: DI point to the two strings and further REP inst. with
CX counter.
{If both the strings are completely equal i.e. CX become zero,
CLD ; Clear DF
; WORD is found
SPECIAL WORKING:-
If the WORD is found in the word of string, before CX become zero, the ZF is
set, otherwise ZF is reset.