The following is a brief summary of the 8086 instruction set:
Data Transfer Instructions
MOV Move byte or word to register or memory
IN, OUT Input byte or word from port, output word to port
LEA Load effective address
LDS, LES Load pointer using data segment, extra segment
PUSH, POP Push word onto stack, pop word off stack
XCHG Exchange byte or word
XLAT Translate byte using look-up table
Logical Instructions
NOT Logical NOT of byte or word (one's complement)
AND Logical AND of byte or word
OR Logical OR of byte or word
XOR Logical exclusive-OR of byte or word
TEST Test byte or word (AND without storing)
Shift and Rotate Instructions
SHL, SHR Logical shift left, right byte or word by 1 or CL
SAL, SAR Arithmetic shift left, right byte or word by 1 or CL
ROL, ROR Rotate left, right byte or word by 1 or CL
RCL, RCR Rotate left, right through carry byte or word by 1 or CL
Arithmetic Instructions ADD, SUB
ADC, SBB
INC, DEC
NEG
CMP
MUL,
DIV IMUL,
IDIV CBW,
CWD
AAA, AAS,
AAM, AAD
DAA, DAS
Add, subtract byte or word
Add, subtract byte or word and carry (borrow) Increment, decrement byte or word
Negate byte or word (two's complement)
Compare byte or word (subtract without storing) Multiply, divide byte or word (unsigned)
Integer multiply, divide byte or word (signed) Convert byte to word, word to double word (useful before multiply/divide)
ASCII adjust for addition, subtraction, multiplication, division (ASCII codes 30-39)
Transfer Instructions JMP
JA (JNBE) JAE (JNB) JB (JNAE) JBE (JNA) JE (JZ) JG (JNLE) JGE (JNL)
Jump if above (not below or"equal) Jump if above or equal (not below) Jump ifbelow (not above or equal) Jump ifbelow or equal (not above) Jump if equal (zero)
Jump if greater (not less or equal) Jump if greater or equal (not less)
JL (JNGE) JLE (JNG) JC, JNC JO, JNO JS, JNS JNP (JPO) Jp (JPE) LOOP
LOOPE (LOOPZ) LOOPNE (LOOPNZ) JCXZ
Jump ifless (not greater nor equal) Jump ifless or equal (not greater) Jump if carry set, carry not set Jump if overflow, no overflow Jump if sign, no sign
Jump if no parity (parity odd) Jump if parity (parity even)
Loop unconditional, count in CX Loop if equal (zero), count in CX
Loop ifnot equal (not zero), count in CX Jump if CX equals zero
Subroutine and Interrupt Instructions
CALL, RET Call, return from procedure
INT, INTO Software interrupt, interrupt if overflow
IRE T Return from interrupt
String Instructions MOVS
MOVSB, MOVSW CMPS
SCAS
LODS, STOS REP
REPE, REPZ REPNE, REPNZ
Move byte or word string Move byte, word string Compare byte or word string Scan byte or word string
Load, store byte or word string Repeat
Repeat while equal, zero Repeat while not equal (zero)
Processor Control Instructions
STC, CLC, CMC Set, clear, complement carry flag
S T D , C L D Set, clear direction flag
S T I, C L I Set, clear interrupt enable flag
LAHF, SAHF Load AH from flags, store AH into flags
PUSHF, POPF Push flags onto stack, pop flags offstack
E S C Escape to external processor interface
LOCK Lock bus during next instruction
NOP No operation (do nothing)
WAIT Wait for signal on TEST input
H L T Halt processor
No comments:
Post a Comment