intel指令集手册_第1页
intel指令集手册_第2页
intel指令集手册_第3页
intel指令集手册_第4页
intel指令集手册_第5页
已阅读5页,还剩81页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Intel 8086 Family Architecture. . . . . . . . . . . . . . . . . . . . . 3Instruction Clock Cycle Calculation . . . . . . . . . . . . . . . . . . 38088/8086 Effective Address (EA) Calculation . . . . . . . . . . . . . 3Task State Calculation. . . . . . . . . . . . . . . . . . . . . . . . . 4FLAGS - Intel 8086 Family Flags Register. . . . . . . . . . . . . . . . 4MSW - Machine Status Word (286+ only) . . . . . . . . . . . . . . . . . 58086/80186/80286/80386/80486 Instruction Set. . . . . . . . . . . . . . 6AAA - Ascii Adjust for Addition. . . . . . . . . . . . . . . . . . 6AAD - Ascii Adjust for Division. . . . . . . . . . . . . . . . . . 6AAM - Ascii Adjust for Multiplication. . . . . . . . . . . . . . . 6AAS - Ascii Adjust for Subtraction . . . . . . . . . . . . . . . . 6ADC - Add With Carry . . . . . . . . . . . . . . . . . . . . . . . 7ADD - Arithmetic Addition. . . . . . . . . . . . . . . . . . . . . 7AND - Logical And. . . . . . . . . . . . . . . . . . . . . . . . . 7ARPL - Adjusted Requested Privilege Level of Selector (286+ PM). . 7BOUND - Array Index Bound Check (80188+) . . . . . . . . . . . . . 8BSF - Bit Scan Forward (386+). . . . . . . . . . . . . . . . . . . 8BSR - Bit Scan Reverse (386+) . . . . . . . . . . . . . . . . . . 8BSWAP - Byte Swap (486+) . . . . . . . . . . . . . . . . . . 8BT - Bit Test (386+) . . . . . . . . . . . . . . . . . . 9BTC - Bit Test with Compliment (386+). . . . . . . . . . . . . . . 9BTR - Bit Test with Reset (386+) . . . . . . . . . . . . . . . . . 9BTS - Bit Test and Set (386+) . . . . . . . . . . . . . . . . . . 9CALL - Procedure Call. . . . . . . . . . . . . . . . . . . . . . . 10CBW - Convert Byte to Word . . . . . . . . . . . . . . . . . . . . 10CDQ - Convert Double to Quad (386+). . . . . . . . . . . . . . . . 10CLC - Clear Carry. . . . . . . . . . . . . . . . . . . . . . . . . 11CLD - Clear Direction Flag . . . . . . . . . . . . . . . . . . . . 11CLI - Clear Interrupt Flag (disable) . . . . . . . . . . . . . . . 11CLTS - Clear Task Switched Flag (286+ privileged). . . . . . . . . 11CMC - Complement Carry Flag. . . . . . . . . . . . . . . . . . . . 11CMP - Compare. . . . . . . . . . . . . . . . . . . . . . . . . . . 12CMPS - Compare String (Byte, Word or Doubleword) . . . . . . . . . 12CMPXCHG - Compare and Exchange . . . . . . . . . . . . . . . . . . 12CWD - Convert Word to Doubleword . . . . . . . . . . . . . . . . . 12CWDE - Convert Word to Extended Doubleword (386+). . . . . . . . . 13DAA - Decimal Adjust for Addition. . . . . . . . . . . . . . . . . 13DAS - Decimal Adjust for Subtraction . . . . . . . . . . . . . . . 13DEC - Decrement. . . . . . . . . . . . . . . . . . . . . . . . . . 13DIV - Divide . . . . . . . . . . . . . . . . . . . . . . . . . . . 13ENTER - Make Stack Frame (80188+) . . . . . . . . . . . . . . . . 14ESC - Escape . . . . . . . . . . . . . . . . . . . . . . . . . . . 14HLT - Halt CPU . . . . . . . . . . . . . . . . . . . . . . . . . . 14IDIV - Signed Integer Division . . . . . . . . . . . . . . . . . . 14IMUL - Signed Multiply . . . . . . . . . . . . . . . . . . . . . . 15IN - Input Byte or Word From Port. . . . . . . . . . . . . . . . . 15INC - Increment. . . . . . . . . . . . . . . . . . . . . . . . . . 16INS - Input String from Port (80188+) . . . . . . . . . . . . . . 16INT - Interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . 16INTO - Interrupt on Overflow . . . . . . . . . . . . . . . . . . . 17INVD - Invalidate Cache (486+). . . . . . . . . . . . . . . . . . 17INVLPG - Invalidate Translation Look-Aside Buffer Entry (486+) . . 17IRET/IRETD - Interrupt Return. . . . . . . . . . . . . . . . . . . 17Jxx - Jump Instructions Table. . . . . . . . . . . . . . . . . . . 18JCXZ/JECXZ - Jump if Register (E)CX is Zero. . . . . . . . . . . . 18JMP - Unconditional Jump . . . . . . . . . . . . . . . . . . . . . 19LAHF - Load Register AH From Flags . . . . . . . . . . . . . . . . 19LAR - Load Access Rights (286+ protected). . . . . . . . . . . . . 19LDS - Load Pointer Using DS. . . . . . . . . . . . . . . . . . . . 20LEA - Load Effective Address . . . . . . . . . . . . . . . . . . . 20LEAVE - Restore Stack for Procedure Exit (80188+). . . . . . . . . 20LES - Load Pointer Using ES. . . . . . . . . . . . . . . . . . . . 20LFS - Load Pointer Using FS (386+) . . . . . . . . . . . . . . . . 21LGDT - Load Global Descriptor Table (286+ privileged). . . . . . . 21LIDT - Load Interrupt Descriptor Table (286+ privileged) . . . . . 21LGS - Load Pointer Using GS (386+) . . . . . . . . . . . . . . . . 21LLDT - Load Local Descriptor Table (286+ privileged) . . . . . . . 22LMSW - Load Machine Status Word (286+ privileged). . . . . . . . . 22LOCK - Lock Bus. . . . . . . . . . . . . . . . . . . . . . . . . . 22LODS - Load String (Byte, Word or Double). . . . . . . . . . . . . 22LOOP - Decrement CX and Loop if CX Not Zero. . . . . . . . . . . . 23LOOPE/LOOPZ - Loop While Equal / Loop While Zero . . . . . . . . . 23LOOPNZ/LOOPNE - Loop While Not Zero / Loop While Not Equal . . . . 23LSL - Load Segment Limit (286+ protected). . . . . . . . . . . . . 23LSS - Load Pointer Using SS (386+) . . . . . . . . . . . . . . . . 24LTR - Load Task Register (286+ privileged) . . . . . . . . . . . . 24MOV - Move Byte or Word. . . . . . . . . . . . . . . . . . . . . . 24MOVS - Move String (Byte or Word). . . . . . . . . . . . . . . . . 25MOVSX - Move with Sign Extend (386+) . . . . . . . . . . . . . . . 25MOVZX - Move with Zero Extend (386+) . . . . . . . . . . . . . . . 25MUL - Unsigned Multiply. . . . . . . . . . . . . . . . . . . . . . 25NEG - Twos Complement Negation. . . . . . . . . . . . . . . . . . 26NOP - No Operation (90h) . . . . . . . . . . . . . . . . . . . . . 26NOT - Ones Compliment Negation (Logical NOT). . . . . . . . . . . 26OR - Inclusive Logical OR. . . . . . . . . . . . . . . . . . . . . 26OUT - Output Data to Port. . . . . . . . . . . . . . . . . . . . . 27OUTS - Output String to Port (80188+) . . . . . . . . . . . . . . 27POP - Pop Word off Stack . . . . . . . . . . . . . . . . . . . . . 27POPA/POPAD - Pop All Registers onto Stack (80188+). . . . . . . . 28POPF/POPFD - Pop Flags off Stack . . . . . . . . . . . . . . . . . 28PUSH - Push Word onto Stack. . . . . . . . . . . . . . . . . . . . 28PUSHA/PUSHAD - Push All Registers onto Stack (80188+) . . . . . . 28PUSHF/PUSHFD - Push Flags onto Stack . . . . . . . . . . . . . . . 29RCL - Rotate Through Carry Left. . . . . . . . . . . . . . . . . . 29RCR - Rotate Through Carry Right . . . . . . . . . . . . . . . . . 29REP - Repeat String Operation. . . . . . . . . . . . . . . . . . . 30REPE/REPZ - Repeat Equal / Repeat Zero . . . . . . . . . . . . . . 30REPNE/REPNZ - Repeat Not Equal / Repeat Not Zero . . . . . . . . . 30RET/RETF - Return From Procedure . . . . . . . . . . . . . . . . . 31ROL - Rotate Left. . . . . . . . . . . . . . . . . . . . . . . . . 31ROR - Rotate Right . . . . . . . . . . . . . . . . . . . . . . . . 31SAHF - Store AH Register into FLAGS. . . . . . . . . . . . . . . . 32SAL/SHL - Shift Arithmetic Left / Shift Logical Left . . . . . . . 32SAR - Shift Arithmetic Right . . . . . . . . . . . . . . . . . . . 32SBB - Subtract with Borrow/Carry . . . . . . . . . . . . . . . . . 33SCAS - Scan String (Byte, Word or Doubleword) . . . . . . . . . . 33SETAE/SETNB - Set if Above or Equal / Set if Not Below (386+). . . 33SETB/SETNAE - Set if Below / Set if Not Above or Equal (386+). . . 33SETBE/SETNA - Set if Below or Equal / Set if Not Above (386+). . . 34SETE/SETZ - Set if Equal / Set if Zero (386+). . . . . . . . . . . 34SETNE/SETNZ - Set if Not Equal / Set if Not Zero (386+). . . . . . 34SETL/SETNGE - Set if Less / Set if Not Greater or Equal (386+) . . 34SETGE/SETNL - Set if Greater or Equal / Set if Not Less (386+) . . 35SETLE/SETNG - Set if Less or Equal / Set if Not greater or Equal (386+) 35SETG/SETNLE - Set if Greater / Set if Not Less or Equal (386+) . . 35SETS - Set if Signed (386+). . . . . . . . . . . . . . . . . . . . 35SETNS - Set if Not Signed (386+) . . . . . . . . . . . . . . . . . 36SETC - Set if Carry (386+) . . . . . . . . . . . . . . . . . . . . 36SETNC - Set if Not Carry (386+). . . . . . . . . . . . . . . . . . 36SETO - Set if Overflow (386+). . . . . . . . . . . . . . . . . . . 36SETNO - Set if Not Overflow (386+) . . . . . . . . . . . . . . . . 36SETP/SETPE - Set if Parity / Set if Parity Even (386+). . . . . . 37SETNP/SETPO - Set if No Parity / Set if Parity Odd (386+). . . . . 37SGDT - Store Global Descriptor Table (286+ privileged) . . . . . . 37SIDT - Store Interrupt Descriptor Table (286+ privileged). . . . . 37SHL - Shift Logical Left . . . . . . . . . . . . . . . . . . . . . 37SHR - Shift Logical Right. . . . . . . . . . . . . . . . . . . . . 38SHLD/SHRD - Double Precision Shift (386+). . . . . . . . . . . . . 38SLDT - Store Local Descriptor Table (286+ privileged). . . . . . . 38SMSW - Store Machine Status Word (286+ privileged) . . . . . . . . 38STC - Set Carry. . . . . . . . . . . . . . . . . . . . . . . . . . 39STD - Set Direction Flag . . . . . . . . . . . . . . . . . . . . . 39STI - Set Interrupt Flag (Enable Interrupts). . . . . . . . . . . 39STOS - Store String (Byte, Word or Doubleword). . . . . . . . . . 39STR - Store Task Register (286+ privileged). . . . . . . . . . . . 39SUB - Subtract . . . . . . . . . . . . . . . . . . . . . . . . . . 40TEST - Test For Bit Pattern. . . . . . . . . . . . . . . . . . . . 40VERR - Verify Read (286+ protected). . . . . . . . . . . . . . . . 40VERW - Verify Write (286+ protected) . . . . . . . . . . . . . . . 40WAIT/FWAIT - Event Wait. . . . . . . . . . . . . . . . . . . . . . 41WBINVD - Write-Back and Invalidate Cache (486+). . . . . . . . . . 41XCHG - Exchange. . . . . . . . . . . . . . . . . . . . . . . . . . 41XLAT/XLATB - Translate . . . . . . . . . . . . . . . . . . . . . . 41XOR - Exclusive OR . . . . . . . . . . . . . . . . . . . . . . . . 42Intel 8086 Family ArchitectureGeneral Purpose Registers Segment RegistersAH/AL AX (EAX) Accumulator CS Code SegmentBH/BL BX (EBX) Base DS Data SegmentCH/CL CX (ECX) Counter SS Stack SegmentDH/DL DX (EDX) Data ES Extra Segment(FS) 386 and newer(Exx) indicates 386+ 32 bit register (GS) 386 and newerPointer Registers Stack RegistersSI (ESI) Source Index SP (ESP) Stack PointerDI (EDI) Destination Index BP (EBP) Base PointerIP Instruction PointerStatus RegistersFLAGS Status Flags (see FLAGS)Special Registers (386+ only)CR0 Control Register 0 DR0 Debug Register 0CR2 Control Register 2 DR1 Debug Register 1CR3 Control Register 3 DR2 Debug Register 2DR3 Debug Register 3TR4 Test Register 4 DR6 Debug Register 6TR5 Test Register 5 DR7 Debug Register 7TR6 Test Register 6TR7 Test Register 7Register Default Segment Valid OverridesBP SS DS, ES, CSSI or DI DS ES, SS, CSDI strings ES NoneSI strings DS ES, SS, CS- see CPU DETECTING Instruction TimingInstruction Clock Cycle CalculationSome instructions require additional clock cycles due to a NextInstruction Component identified by a +m in the instructionclock cycle listings. This is due to the prefetch queue beingpurge on a control transfers. Below is the general rule forcalculating m:88/86 not applicable286 m is the number of bytes in the next instruction386 m is the number of components in the next instruction(the instruction coding (each byte), plus the data andthe displacement are all considered components)8088/8086 Effective Address (EA) CalculationDescription Clock CyclesDisplacement 6Base or Index (BX,BP,SI,DI) 5Displacement+(Base or Index) 9Base+Index (BP+DI,BX+SI) 7Base+Index (BP+SI,BX+DI) 8Base+Index+Displacement (BP+DI,BX+SI) 11Base+Index+Displacement (BP+SI+disp,BX+DI+disp) 12- add 4 cycles for word operands at odd addresses- add 2 cycles for segment override- 80188/80186 timings differ from those of the 8088/8086/80286Task State CalculationTS is defined as switching from VM/486 or 80286 TSS to one ofthe following: New Task 486 TSS486 TSS386 TSS386 TSS286 TSS Old Task (VM=0) (VM=1) (VM=0) (VM=1) 386 TSS (VM=0) 309 226 282 386 TSS (VM=1) 314 231 287 386 CPU/286 TSS 307 224 280 486 CPU/286 TSS 199 177 180 Miscellaneous- all timings are for best case and do not take into account waitstates, instruction alignment, the state of the prefetch queue,DMA refresh cycles, cache hits/misses or exception processing.- to convert clocks to nanoseconds divide one microsecond by theprocessor speed in MegaHertz:(1000MHz/(n MHz) = X nanoseconds- see 8086 ArchitectureFLAGS - Intel 8086 Family Flags Register1110FEDCBA9876543210 CF Carry Flag 1 PF Parity Flag 0 AF Auxiliary Flag 0 ZF Zero Flag SF Sign Flag TF Trap Flag (Single Step) IF Interrupt Flag DF Direction Flag OF Overflow flag IOPL I/O Privilege Level (286+ only) NT Nested Task Flag (286+ only) 0 RF Resume Flag (386+ only) VM Virtual Mode Flag (386+ only)- see PUSHF POPF STI CLI STD CLDMSW - Machine Status Word (286+ only)3130-543210 Machine Status Word Protection Enable (PE) Math Present (MP) Emulation (EM) Task Switched (TS) Extension Type (ET) Reserved Paging (PG)Bit 0 PE Protection Enable, switches processor betweenprotected and real modeBit 1 MP Math Present, controls function of the WAITinstructionBit 2 EM Emulation, indicates whether coprocessor functionsare to be emulatedBit 3 TS Task Switched, set and interrogated by coprocessoron task switches and when interpretting coprocessorinstructionsBit 4 ET Extension Type, indicates type of coprocessor insystemBits 5-30 Reservedbit 31 PG Paging, indicates whether the processor uses pagetables to translate linear addresses to physicaladdresses- see SMSW LMSW8086/80186/80286/80386/80486 Instruction SetAAA - Ascii Adjust for AdditionUsage: AAAModifies flags: AF CF (OF,PF,SF,ZF undefined)Changes contents of AL to valid unpacked decimal. The high ordernibble is zeroed.Clocks SizeOperands 808x 286 386 486 Bytesnone 8 3 4 3 1AAD - Ascii Adjust for DivisionUsage: AADModifies flags: SF ZF PF (AF,CF,OF undefined)Used before dividing unpacked decimal numbers. Multiplies AH by10 and the adds result into AL. Sets AH to zero. This instructionis also known to have an undocumented behavior.AL := 10*AH+ALAH := 0Clocks SizeOperands 808x 286 386 486 Bytesnone 60 14 19 14 2AAM - Ascii Adjust for MultiplicationUsage: AAMModifies flags: PF SF ZF (AF,CF,OF undefined)AH := AL / 10AL := AL mod 10Used after multiplication of two unpacked decimal numbers, thisinstruction adjusts an unpacked decimal number. The high ordernibble of each byte must be zeroed before using this instruction.This instruction is also known to have an undocumented behavior

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论