6. The 80x86 Instruction Set
Chapter Overview
The Processor Status Register (Flags)
Instruction Encodings
Data Movement Instructions
The MOV Instruction
The XCHG Instruction
The LDS, LES, LFS, LGS, and LSS Instructions
The LEA Instruction
The PUSH and POP Instructions
The LAHF and SAHF Instructions
Conversions
The MOVZX, MOVSX, CBW, CWD, CWDE, and CDQ Instructions
The BSWAP Instruction
The XLAT Instruction
Arithmetic Instructions
The Addition Instructions: ADD, ADC, INC, XADD, AAA, and DAA
The ADD and ADC Instructions
The INC Instruction
The XADD Instruction
The AAA and DAA Instructions
The Subtraction Instructions: SUB, SBB, DEC, AAS, and DAS
The CMP Instruction
The CMPXCHG, and CMPXCHG8B Instructions
The NEG Instruction
The Multiplication Instructions: MUL, IMUL, and AAM
The Division Instructions: DIV, IDIV, and AAD
Logical, Shift, Rotate and Bit Instructions
The Logical Instructions: AND, OR, XOR, and NOT
The Shift Instructions: SHL/SAL, SHR, SAR, SHLD, and SHRD
SHL/SAL
SAR
SHR
The SHLD and SHRD Instructions
The Rotate Instructions: RCL, RCR, ROL, and ROR
RCL
RCR
ROL
ROR
The Bit Operations
TEST
The Bit Test Instructions: BT, BTS, BTR, and BTC
Bit Scanning: BSF and BSR
The ÏSet on ConditionÓ Instructions
I/O Instructions
String Instructions
Program Flow Control Instructions
Unconditional Jumps
The CALL and RET Instructions
The INT, INTO, BOUND, and IRET Instructions
The Conditional Jump Instructions
The JCXZ/JECXZ Instructions
The LOOP Instruction
The LOOPE/LOOPZ Instruction
The LOOPNE/LOOPNZ Instruction
Miscellaneous Instructions
Sample Programs
Simple Arithmetic I
Simple Arithmetic II
Logical Operations
Shift and Rotate Operations
Bit Operations and SETcc Instructions
String Operations
Conditional Jumps
CALL and INT Instructions
Conditional Jumps I
Conditional Jump Instructions II
Laboratory Exercises
The IBM/L System
IBM/L Exercises
Programming Projects
Summary
Questions