Chapter 9 & 10 Flashcards
MOVSB, MOVSB, and MOVSD
Move the string BYTE, “”WORD, “”DWORD
Copies data from the memory location pointed to by ESI to the memory location pointed to by EDI
Direction Flag
Controls the inc or dec of ESI and EDI
DF = 0 - forward/increment DF = 1 - backward/decrement
CLD
Clear Direction Flag
STD
Set Direction Flag
Repeat Prefix
REP - inserted before MOVSB, MOVSW, etc.
ECX controls num reps
REPE(REPZ)
REPNE(REPNZ)
CMPSB, CMPSW, and CMPSD
Compare string byte, “”WORD, “”DWORD
Compares a memory operand pointed to by ESI to a memory operand pointed to by EDI
SCASB, SCASW, and SCASD
Scan string byte, WORD, DWORD
Compares a value in AL/AX/EAX to a byte, word, or DWORD addressed by EDI
LODSB, LODSW, LODSD
Load string byte,…
Loads a byte or word from memory at ESI into AL/AX/EAX respectively
Str_compare Procedure
Compares string1 and string2
Str_length Procedure
Calculates the length of a null-terminated string and returns the length in the EAX register
Str_copy Procedure
Copies a null-terminated string from a source location to a target location
Str_trim
Removes all occurrences of a selected trailing character from a null terminated string
Str_ucase Procedure
Converts a string to all uppercase characters
Base-Index Operand
Adds the values of two registers (called base and index), producing an effective address
Base-Index-Displacement Operand
Adds the base and index registers to a constant, producing an effective address