Professional Documents
Culture Documents
Main unprivileged
commands - III
String operations
Command: REP
Purpose: Repeat
Command: REPE
Purpose: Repeat, while equal
Command: REPNE
Purpose: Repeat, while not equal
Command: REPZ
Purpose: Repeat, while zero
Command: REPNZ
Purpose: Repeat, while not zero
Lecture 5-6. Main unprivileged
commands - III
Command: MOVSB
Purpose: Copying byte string
Command: MOVSW
Purpose: Copying word string
Command: MOVSD
Purpose: Copying double word string
Lecture 5-6. Main unprivileged
commands - III
Command: CMPSB
Purpose: Comparing byte strings
Command: CMPSW
Purpose: Comparing word strings
Command: CMPSD
Purpose: Comparing double word strings
Lecture 5-6. Main unprivileged
commands - III
Command: SCASB
Purpose: Scanning byte string
Command: SCASW
Purpose: Scanning word string
Command: SCASD
Purpose: Scanning double word string
Lecture 5-6. Main unprivileged
commands - III
Command: LODSB
Purpose: Reading byte from string
Command: LODSW
Purpose: Reading word from string
Command: LODSD
Purpose: Reading double word from string
Lecture 5-6. Main unprivileged
commands - III
Command: STOSB
Purpose: Writing byte in string
Command: STOSW
Purpose: Writing word in string
Command: STOSD
Purpose: Writing double word in string
Lecture 5-6. Main unprivileged
commands - III
Command: INSB
Purpose: Reading byte string from port
Command: INSW
Purpose: Reading word string from port
Command: INSD
Purpose: Reading double word string from port
Lecture 5-6. Main unprivileged
commands - III
Command: OUTSB
Purpose: Writing byte string in port
Command: OUTSW
Purpose: Writing word string in port
Command: OUTSD
Purpose: Writing double word string in port
Lecture 5-6. Main unprivileged
commands - III
Flag management
Command: STC
Purpose: Set carryover flag
Command: CLC
Purpose: Reset carryover flag
Command: CMC
Purpose: Invert carryover flag
Command: STD
Purpose: Set direction flag
Command: CLD
Purpose: Reset direction flag
Lecture 5-6. Main unprivileged
commands - III
Command: LAHF
Purpose: Load state flags in AH
Command: SAHF
Purpose: Load state flags from AH
Command: PUSHF
Purpose: Place FLAGS in stack
Command: PUSHFD
Purpose: Place EFLAGS in stack
Lecture 5-6. Main unprivileged
commands - III
Command: POPF
Purpose: Load FLAGS from stack
Command: POPFD
Purpose: Load EFLAGS form stack
Command: CLI
Purpose: Disable interruptions
Command: STI
Purpose: Enable interruptions
Command: SALC
Purpose: Set AL according to CF
Lecture 5-6. Main unprivileged
commands - III
Loading segment registers
Command: LDS receiver, source
Purpose: Load address, using DS
Other commands
Command: NOP
Purpose: Lack of operation
Command: LOCK
Purpose: Blocking prefix of data bus
Command: UD2
Purpose: Indefinite operation
Command: CPUID
Purpose: Processor identification