Advertisement
krot

Assembler Command overview

Jul 22nd, 2018
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 113.20 KB | None | 0 0
  1.  
  2. Intel 8086 Family Architecture. . . . . . . . . . . . . . . . . . . . . 3
  3.  
  4. Instruction Clock Cycle Calculation . . . . . . . . . . . . . . . . . . 3
  5.  
  6. 8088/8086 Effective Address (EA) Calculation . . . . . . . . . . . . . 3
  7.  
  8. Task State Calculation. . . . . . . . . . . . . . . . . . . . . . . . . 4
  9.  
  10. FLAGS - Intel 8086 Family Flags Register. . . . . . . . . . . . . . . . 4
  11.  
  12. MSW - Machine Status Word (286+ only) . . . . . . . . . . . . . . . . . 5
  13.  
  14. 8086/80186/80286/80386/80486 Instruction Set. . . . . . . . . . . . . . 6
  15. AAA - Ascii Adjust for Addition. . . . . . . . . . . . . . . . . . 6
  16. AAD - Ascii Adjust for Division. . . . . . . . . . . . . . . . . . 6
  17. AAM - Ascii Adjust for Multiplication. . . . . . . . . . . . . . . 6
  18. AAS - Ascii Adjust for Subtraction . . . . . . . . . . . . . . . . 6
  19. ADC - Add With Carry . . . . . . . . . . . . . . . . . . . . . . . 7
  20. ADD - Arithmetic Addition. . . . . . . . . . . . . . . . . . . . . 7
  21. AND - Logical And. . . . . . . . . . . . . . . . . . . . . . . . . 7
  22. ARPL - Adjusted Requested Privilege Level of Selector (286+ PM). . 7
  23. BOUND - Array Index Bound Check (80188+) . . . . . . . . . . . . . 8
  24. BSF - Bit Scan Forward (386+). . . . . . . . . . . . . . . . . . . 8
  25. BSR - Bit Scan Reverse (386+) . . . . . . . . . . . . . . . . . . 8
  26. BSWAP - Byte Swap (486+) . . . . . . . . . . . . . . . . . . 8
  27. BT - Bit Test (386+) . . . . . . . . . . . . . . . . . . 9
  28. BTC - Bit Test with Compliment (386+). . . . . . . . . . . . . . . 9
  29. BTR - Bit Test with Reset (386+) . . . . . . . . . . . . . . . . . 9
  30. BTS - Bit Test and Set (386+) . . . . . . . . . . . . . . . . . . 9
  31. CALL - Procedure Call. . . . . . . . . . . . . . . . . . . . . . . 10
  32. CBW - Convert Byte to Word . . . . . . . . . . . . . . . . . . . . 10
  33. CDQ - Convert Double to Quad (386+). . . . . . . . . . . . . . . . 10
  34. CLC - Clear Carry. . . . . . . . . . . . . . . . . . . . . . . . . 11
  35. CLD - Clear Direction Flag . . . . . . . . . . . . . . . . . . . . 11
  36. CLI - Clear Interrupt Flag (disable) . . . . . . . . . . . . . . . 11
  37. CLTS - Clear Task Switched Flag (286+ privileged). . . . . . . . . 11
  38. CMC - Complement Carry Flag. . . . . . . . . . . . . . . . . . . . 11
  39. CMP - Compare. . . . . . . . . . . . . . . . . . . . . . . . . . . 12
  40. CMPS - Compare String (Byte, Word or Doubleword) . . . . . . . . . 12
  41. CMPXCHG - Compare and Exchange . . . . . . . . . . . . . . . . . . 12
  42. CWD - Convert Word to Doubleword . . . . . . . . . . . . . . . . . 12
  43. CWDE - Convert Word to Extended Doubleword (386+). . . . . . . . . 13
  44. DAA - Decimal Adjust for Addition. . . . . . . . . . . . . . . . . 13
  45. DAS - Decimal Adjust for Subtraction . . . . . . . . . . . . . . . 13
  46. DEC - Decrement. . . . . . . . . . . . . . . . . . . . . . . . . . 13
  47. DIV - Divide . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
  48. ENTER - Make Stack Frame (80188+) . . . . . . . . . . . . . . . . 14
  49. ESC - Escape . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
  50. HLT - Halt CPU . . . . . . . . . . . . . . . . . . . . . . . . . . 14
  51. IDIV - Signed Integer Division . . . . . . . . . . . . . . . . . . 14
  52. IMUL - Signed Multiply . . . . . . . . . . . . . . . . . . . . . . 15
  53. IN - Input Byte or Word From Port. . . . . . . . . . . . . . . . . 15
  54. INC - Increment. . . . . . . . . . . . . . . . . . . . . . . . . . 16
  55. INS - Input String from Port (80188+) . . . . . . . . . . . . . . 16
  56. INT - Interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . 16
  57. INTO - Interrupt on Overflow . . . . . . . . . . . . . . . . . . . 17
  58. INVD - Invalidate Cache (486+). . . . . . . . . . . . . . . . . . 17
  59. INVLPG - Invalidate Translation Look-Aside Buffer Entry (486+) . . 17
  60. IRET/IRETD - Interrupt Return. . . . . . . . . . . . . . . . . . . 17
  61. Jxx - Jump Instructions Table. . . . . . . . . . . . . . . . . . . 18
  62. JCXZ/JECXZ - Jump if Register (E)CX is Zero. . . . . . . . . . . . 18
  63. JMP - Unconditional Jump . . . . . . . . . . . . . . . . . . . . . 19
  64. LAHF - Load Register AH From Flags . . . . . . . . . . . . . . . . 19
  65. LAR - Load Access Rights (286+ protected). . . . . . . . . . . . . 19
  66. LDS - Load Pointer Using DS. . . . . . . . . . . . . . . . . . . . 20
  67. LEA - Load Effective Address . . . . . . . . . . . . . . . . . . . 20
  68. LEAVE - Restore Stack for Procedure Exit (80188+). . . . . . . . . 20
  69. LES - Load Pointer Using ES. . . . . . . . . . . . . . . . . . . . 20
  70. LFS - Load Pointer Using FS (386+) . . . . . . . . . . . . . . . . 21
  71. LGDT - Load Global Descriptor Table (286+ privileged). . . . . . . 21
  72. LIDT - Load Interrupt Descriptor Table (286+ privileged) . . . . . 21
  73. LGS - Load Pointer Using GS (386+) . . . . . . . . . . . . . . . . 21
  74. LLDT - Load Local Descriptor Table (286+ privileged) . . . . . . . 22
  75. LMSW - Load Machine Status Word (286+ privileged). . . . . . . . . 22
  76. LOCK - Lock Bus. . . . . . . . . . . . . . . . . . . . . . . . . . 22
  77. LODS - Load String (Byte, Word or Double). . . . . . . . . . . . . 22
  78. LOOP - Decrement CX and Loop if CX Not Zero. . . . . . . . . . . . 23
  79. LOOPE/LOOPZ - Loop While Equal / Loop While Zero . . . . . . . . . 23
  80. LOOPNZ/LOOPNE - Loop While Not Zero / Loop While Not Equal . . . . 23
  81. LSL - Load Segment Limit (286+ protected). . . . . . . . . . . . . 23
  82. LSS - Load Pointer Using SS (386+) . . . . . . . . . . . . . . . . 24
  83. LTR - Load Task Register (286+ privileged) . . . . . . . . . . . . 24
  84. MOV - Move Byte or Word. . . . . . . . . . . . . . . . . . . . . . 24
  85. MOVS - Move String (Byte or Word). . . . . . . . . . . . . . . . . 25
  86. MOVSX - Move with Sign Extend (386+) . . . . . . . . . . . . . . . 25
  87. MOVZX - Move with Zero Extend (386+) . . . . . . . . . . . . . . . 25
  88. MUL - Unsigned Multiply. . . . . . . . . . . . . . . . . . . . . . 25
  89. NEG - Two's Complement Negation. . . . . . . . . . . . . . . . . . 26
  90. NOP - No Operation (90h) . . . . . . . . . . . . . . . . . . . . . 26
  91. NOT - One's Compliment Negation (Logical NOT). . . . . . . . . . . 26
  92. OR - Inclusive Logical OR. . . . . . . . . . . . . . . . . . . . . 26
  93. OUT - Output Data to Port. . . . . . . . . . . . . . . . . . . . . 27
  94. OUTS - Output String to Port (80188+) . . . . . . . . . . . . . . 27
  95. POP - Pop Word off Stack . . . . . . . . . . . . . . . . . . . . . 27
  96. POPA/POPAD - Pop All Registers onto Stack (80188+). . . . . . . . 28
  97. POPF/POPFD - Pop Flags off Stack . . . . . . . . . . . . . . . . . 28
  98. PUSH - Push Word onto Stack. . . . . . . . . . . . . . . . . . . . 28
  99. PUSHA/PUSHAD - Push All Registers onto Stack (80188+) . . . . . . 28
  100. PUSHF/PUSHFD - Push Flags onto Stack . . . . . . . . . . . . . . . 29
  101. RCL - Rotate Through Carry Left. . . . . . . . . . . . . . . . . . 29
  102. RCR - Rotate Through Carry Right . . . . . . . . . . . . . . . . . 29
  103. REP - Repeat String Operation. . . . . . . . . . . . . . . . . . . 30
  104. REPE/REPZ - Repeat Equal / Repeat Zero . . . . . . . . . . . . . . 30
  105. REPNE/REPNZ - Repeat Not Equal / Repeat Not Zero . . . . . . . . . 30
  106. RET/RETF - Return From Procedure . . . . . . . . . . . . . . . . . 31
  107. ROL - Rotate Left. . . . . . . . . . . . . . . . . . . . . . . . . 31
  108. ROR - Rotate Right . . . . . . . . . . . . . . . . . . . . . . . . 31
  109. SAHF - Store AH Register into FLAGS. . . . . . . . . . . . . . . . 32
  110. SAL/SHL - Shift Arithmetic Left / Shift Logical Left . . . . . . . 32
  111. SAR - Shift Arithmetic Right . . . . . . . . . . . . . . . . . . . 32
  112. SBB - Subtract with Borrow/Carry . . . . . . . . . . . . . . . . . 33
  113. SCAS - Scan String (Byte, Word or Doubleword) . . . . . . . . . . 33
  114. SETAE/SETNB - Set if Above or Equal / Set if Not Below (386+). . . 33
  115. SETB/SETNAE - Set if Below / Set if Not Above or Equal (386+). . . 33
  116. SETBE/SETNA - Set if Below or Equal / Set if Not Above (386+). . . 34
  117. SETE/SETZ - Set if Equal / Set if Zero (386+). . . . . . . . . . . 34
  118. SETNE/SETNZ - Set if Not Equal / Set if Not Zero (386+). . . . . . 34
  119. SETL/SETNGE - Set if Less / Set if Not Greater or Equal (386+) . . 34
  120. SETGE/SETNL - Set if Greater or Equal / Set if Not Less (386+) . . 35
  121. SETLE/SETNG - Set if Less or Equal / Set if Not greater or Equal (386+) 35
  122. SETG/SETNLE - Set if Greater / Set if Not Less or Equal (386+) . . 35
  123. SETS - Set if Signed (386+). . . . . . . . . . . . . . . . . . . . 35
  124. SETNS - Set if Not Signed (386+) . . . . . . . . . . . . . . . . . 36
  125. SETC - Set if Carry (386+) . . . . . . . . . . . . . . . . . . . . 36
  126. SETNC - Set if Not Carry (386+). . . . . . . . . . . . . . . . . . 36
  127. SETO - Set if Overflow (386+). . . . . . . . . . . . . . . . . . . 36
  128. SETNO - Set if Not Overflow (386+) . . . . . . . . . . . . . . . . 36
  129. SETP/SETPE - Set if Parity / Set if Parity Even (386+). . . . . . 37
  130. SETNP/SETPO - Set if No Parity / Set if Parity Odd (386+). . . . . 37
  131. SGDT - Store Global Descriptor Table (286+ privileged) . . . . . . 37
  132. SIDT - Store Interrupt Descriptor Table (286+ privileged). . . . . 37
  133. SHL - Shift Logical Left . . . . . . . . . . . . . . . . . . . . . 37
  134. SHR - Shift Logical Right. . . . . . . . . . . . . . . . . . . . . 38
  135. SHLD/SHRD - Double Precision Shift (386+). . . . . . . . . . . . . 38
  136. SLDT - Store Local Descriptor Table (286+ privileged). . . . . . . 38
  137. SMSW - Store Machine Status Word (286+ privileged) . . . . . . . . 38
  138. STC - Set Carry. . . . . . . . . . . . . . . . . . . . . . . . . . 39
  139. STD - Set Direction Flag . . . . . . . . . . . . . . . . . . . . . 39
  140. STI - Set Interrupt Flag (Enable Interrupts). . . . . . . . . . . 39
  141. STOS - Store String (Byte, Word or Doubleword). . . . . . . . . . 39
  142. STR - Store Task Register (286+ privileged). . . . . . . . . . . . 39
  143. SUB - Subtract . . . . . . . . . . . . . . . . . . . . . . . . . . 40
  144. TEST - Test For Bit Pattern. . . . . . . . . . . . . . . . . . . . 40
  145. VERR - Verify Read (286+ protected). . . . . . . . . . . . . . . . 40
  146. VERW - Verify Write (286+ protected) . . . . . . . . . . . . . . . 40
  147. WAIT/FWAIT - Event Wait. . . . . . . . . . . . . . . . . . . . . . 41
  148. WBINVD - Write-Back and Invalidate Cache (486+). . . . . . . . . . 41
  149. XCHG - Exchange. . . . . . . . . . . . . . . . . . . . . . . . . . 41
  150. XLAT/XLATB - Translate . . . . . . . . . . . . . . . . . . . . . . 41
  151. XOR - Exclusive OR . . . . . . . . . . . . . . . . . . . . . . . . 42
  152. Intel 8086 Family Architecture
  153.  
  154. General Purpose Registers Segment Registers
  155.  
  156. AH/AL AX (EAX) Accumulator CS Code Segment
  157. BH/BL BX (EBX) Base DS Data Segment
  158. CH/CL CX (ECX) Counter SS Stack Segment
  159. DH/DL DX (EDX) Data ES Extra Segment
  160. (FS) 386 and newer
  161. (Exx) indicates 386+ 32 bit register (GS) 386 and newer
  162.  
  163.  
  164. Pointer Registers Stack Registers
  165.  
  166. SI (ESI) Source Index SP (ESP) Stack Pointer
  167. DI (EDI) Destination Index BP (EBP) Base Pointer
  168. IP Instruction Pointer
  169.  
  170. Status Registers
  171.  
  172. FLAGS Status Flags (see FLAGS)
  173.  
  174. Special Registers (386+ only)
  175.  
  176. CR0 Control Register 0 DR0 Debug Register 0
  177. CR2 Control Register 2 DR1 Debug Register 1
  178. CR3 Control Register 3 DR2 Debug Register 2
  179. DR3 Debug Register 3
  180. TR4 Test Register 4 DR6 Debug Register 6
  181. TR5 Test Register 5 DR7 Debug Register 7
  182. TR6 Test Register 6
  183. TR7 Test Register 7
  184.  
  185. Register Default Segment Valid Overrides
  186.  
  187. BP SS DS, ES, CS
  188. SI or DI DS ES, SS, CS
  189. DI strings ES None
  190. SI strings DS ES, SS, CS
  191.  
  192.  
  193. - see CPU DETECTING Instruction Timing
  194.  
  195. Instruction Clock Cycle Calculation
  196.  
  197.  
  198. Some instructions require additional clock cycles due to a "Next
  199. Instruction Component" identified by a "+m" in the instruction
  200. clock cycle listings. This is due to the prefetch queue being
  201. purge on a control transfers. Below is the general rule for
  202. calculating "m":
  203.  
  204.  
  205. 88/86 not applicable
  206. 286 "m" is the number of bytes in the next instruction
  207. 386 "m" is the number of components in the next instruction
  208. (the instruction coding (each byte), plus the data and
  209. the displacement are all considered components)
  210.  
  211.  
  212. 8088/8086 Effective Address (EA) Calculation
  213.  
  214. Description Clock Cycles
  215.  
  216. Displacement 6
  217. Base or Index (BX,BP,SI,DI) 5
  218. Displacement+(Base or Index) 9
  219. Base+Index (BP+DI,BX+SI) 7
  220. Base+Index (BP+SI,BX+DI) 8
  221. Base+Index+Displacement (BP+DI,BX+SI) 11
  222. Base+Index+Displacement (BP+SI+disp,BX+DI+disp) 12
  223.  
  224.  
  225. - add 4 cycles for word operands at odd addresses
  226. - add 2 cycles for segment override
  227. - 80188/80186 timings differ from those of the 8088/8086/80286
  228. Task State Calculation
  229.  
  230. "TS" is defined as switching from VM/486 or 80286 TSS to one of
  231. the following:
  232.  
  233. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  234. ³ New Task ³
  235. ÃÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ´
  236. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´486 TSS³486 TSS³386 TSS³386 TSS³286 TSS³
  237. ³ Old Task ³ (VM=0)³ (VM=1)³ (VM=0)³ (VM=1)³ ³
  238. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄ´
  239. 386 TSS (VM=0) ³ ³ ³ 309 ³ 226 ³ 282 ³
  240. ÃÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄ´
  241. 386 TSS (VM=1) ³ ³ ³ 314 ³ 231 ³ 287 ³
  242. ÃÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄ´
  243. 386 CPU/286 TSS ³ ³ ³ 307 ³ 224 ³ 280 ³
  244. ÃÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄ´
  245. 486 CPU/286 TSS ³ 199 ³ 177 ³ ³ ³ 180 ³
  246. ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ
  247.  
  248.  
  249. Miscellaneous
  250.  
  251. - all timings are for best case and do not take into account wait
  252. states, instruction alignment, the state of the prefetch queue,
  253. DMA refresh cycles, cache hits/misses or exception processing.
  254. - to convert clocks to nanoseconds divide one microsecond by the
  255. processor speed in MegaHertz:
  256.  
  257. (1000MHz/(n MHz)) = X nanoseconds
  258.  
  259. - see 8086 Architecture
  260.  
  261.  
  262. FLAGS - Intel 8086 Family Flags Register
  263.  
  264. ³11³10³F³E³D³C³B³A³9³8³7³6³5³4³3³2³1³0³
  265. ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄ CF Carry Flag
  266. ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄ 1
  267. ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄ PF Parity Flag
  268. ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄ 0
  269. ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄ AF Auxiliary Flag
  270. ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄ 0
  271. ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄ ZF Zero Flag
  272. ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄ SF Sign Flag
  273. ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄ TF Trap Flag (Single Step)
  274. ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄ IF Interrupt Flag
  275. ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄ DF Direction Flag
  276. ³ ³ ³ ³ ³ ³ ÀÄÄÄ OF Overflow flag
  277. ³ ³ ³ ³ ÀÄÁÄÄÄ IOPL I/O Privilege Level (286+ only)
  278. ³ ³ ³ ÀÄÄÄÄÄ NT Nested Task Flag (286+ only)
  279. ³ ³ ÀÄÄÄÄÄ 0
  280. ³ ÀÄÄÄÄÄ RF Resume Flag (386+ only)
  281. ÀÄÄÄÄÄÄ VM Virtual Mode Flag (386+ only)
  282.  
  283. - see PUSHF POPF STI CLI STD CLD
  284. MSW - Machine Status Word (286+ only)
  285.  
  286.  
  287. ³31³30-5³4³3³2³1³0³ Machine Status Word
  288. ³ ³ ³ ³ ³ ³ ÀÄÄÄÄ Protection Enable (PE)
  289. ³ ³ ³ ³ ³ ÀÄÄÄÄÄ Math Present (MP)
  290. ³ ³ ³ ³ ÀÄÄÄÄÄÄ Emulation (EM)
  291. ³ ³ ³ ÀÄÄÄÄÄÄÄ Task Switched (TS)
  292. ³ ³ ÀÄÄÄÄÄÄÄÄ Extension Type (ET)
  293. ³ ÀÄÄÄÄÄÄÄÄÄÄ Reserved
  294. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄ Paging (PG)
  295.  
  296.  
  297. Bit 0 PE Protection Enable, switches processor between
  298. protected and real mode
  299. Bit 1 MP Math Present, controls function of the WAIT
  300. instruction
  301. Bit 2 EM Emulation, indicates whether coprocessor functions
  302. are to be emulated
  303. Bit 3 TS Task Switched, set and interrogated by coprocessor
  304. on task switches and when interpretting coprocessor
  305. instructions
  306. Bit 4 ET Extension Type, indicates type of coprocessor in
  307. system
  308. Bits 5-30 Reserved
  309. bit 31 PG Paging, indicates whether the processor uses page
  310. tables to translate linear addresses to physical
  311. addresses
  312.  
  313. - see SMSW LMSW
  314. 8086/80186/80286/80386/80486 Instruction Set
  315.  
  316. AAA - Ascii Adjust for Addition
  317.  
  318. Usage: AAA
  319. Modifies flags: AF CF (OF,PF,SF,ZF undefined)
  320.  
  321. Changes contents of AL to valid unpacked decimal. The high order
  322. nibble is zeroed.
  323.  
  324. Clocks Size
  325. Operands 808x 286 386 486 Bytes
  326.  
  327. none 8 3 4 3 1
  328.  
  329.  
  330. AAD - Ascii Adjust for Division
  331.  
  332. Usage: AAD
  333. Modifies flags: SF ZF PF (AF,CF,OF undefined)
  334.  
  335. Used before dividing unpacked decimal numbers. Multiplies AH by
  336. 10 and the adds result into AL. Sets AH to zero. This instruction
  337. is also known to have an undocumented behavior.
  338.  
  339. AL := 10*AH+AL
  340. AH := 0
  341.  
  342. Clocks Size
  343. Operands 808x 286 386 486 Bytes
  344.  
  345. none 60 14 19 14 2
  346.  
  347.  
  348. AAM - Ascii Adjust for Multiplication
  349.  
  350.  
  351. Usage: AAM
  352. Modifies flags: PF SF ZF (AF,CF,OF undefined)
  353.  
  354. AH := AL / 10
  355. AL := AL mod 10
  356.  
  357. Used after multiplication of two unpacked decimal numbers, this
  358. instruction adjusts an unpacked decimal number. The high order
  359. nibble of each byte must be zeroed before using this instruction.
  360. This instruction is also known to have an undocumented behavior.
  361.  
  362. Clocks Size
  363. Operands 808x 286 386 486 Bytes
  364.  
  365. none 83 16 17 15 2
  366.  
  367.  
  368. AAS - Ascii Adjust for Subtraction
  369.  
  370. Usage: AAS
  371. Modifies flags: AF CF (OF,PF,SF,ZF undefined)
  372.  
  373. Corrects result of a previous unpacked decimal subtraction in AL.
  374. High order nibble is zeroed.
  375.  
  376. Clocks Size
  377. Operands 808x 286 386 486 Bytes
  378.  
  379. none 8 3 4 3 1
  380. ADC - Add With Carry
  381.  
  382. Usage: ADC dest,src
  383. Modifies flags: AF CF OF SF PF ZF
  384.  
  385. Sums two binary operands placing the result in the destination.
  386. If CF is set, a 1 is added to the destination.
  387.  
  388. Clocks Size
  389. Operands 808x 286 386 486 Bytes
  390.  
  391. reg,reg 3 2 2 1 2
  392. mem,reg 16+EA 7 7 3 2-4 (W88=24+EA)
  393. reg,mem 9+EA 7 6 2 2-4 (W88=13+EA)
  394. reg,immed 4 3 2 1 3-4
  395. mem,immed 17+EA 7 7 3 3-6 (W88=23+EA)
  396. accum,immed 4 3 2 1 2-3
  397.  
  398.  
  399. ADD - Arithmetic Addition
  400.  
  401. Usage: ADD dest,src
  402. Modifies flags: AF CF OF PF SF ZF
  403.  
  404. Adds "src" to "dest" and replacing the original contents of "dest".
  405. Both operands are binary.
  406.  
  407. Clocks Size
  408. Operands 808x 286 386 486 Bytes
  409.  
  410. reg,reg 3 2 2 1 2
  411. mem,reg 16+EA 7 7 3 2-4 (W88=24+EA)
  412. reg,mem 9+EA 7 6 2 2-4 (W88=13+EA)
  413. reg,immed 4 3 2 1 3-4
  414. mem,immed 17+EA 7 7 3 3-6 (W88=23+EA)
  415. accum,immed 4 3 2 1 2-3
  416.  
  417.  
  418. AND - Logical And
  419.  
  420. Usage: AND dest,src
  421. Modifies flags: CF OF PF SF ZF (AF undefined)
  422.  
  423. Performs a logical AND of the two operands replacing the destination
  424. with the result.
  425.  
  426. Clocks Size
  427. Operands 808x 286 386 486 Bytes
  428.  
  429. reg,reg 3 2 2 1 2
  430. mem,reg 16+EA 7 7 3 2-4 (W88=24+EA)
  431. reg,mem 9+EA 7 6 1 2-4 (W88=13+EA)
  432. reg,immed 4 3 2 1 3-4
  433. mem,immed 17+EA 7 7 3 3-6 (W88=23+EA)
  434. accum,immed 4 3 2 1 2-3
  435.  
  436.  
  437. ARPL - Adjusted Requested Privilege Level of Selector (286+ PM)
  438.  
  439. Usage: ARPL dest,src
  440. (286+ protected mode)
  441. Modifies flags: ZF
  442.  
  443. Compares the RPL bits of "dest" against "src". If the RPL bits
  444. of "dest" are less than "src", the destination RPL bits are set
  445. equal to the source RPL bits and the Zero Flag is set. Otherwise
  446. the Zero Flag is cleared.
  447.  
  448. Clocks Size
  449. Operands 808x 286 386 486 Bytes
  450.  
  451. reg,reg - 10 20 9 2
  452. mem,reg - 11 21 9 4
  453. BOUND - Array Index Bound Check (80188+)
  454.  
  455. Usage: BOUND src,limit
  456. Modifies flags: None
  457.  
  458. Array index in source register is checked against upper and lower
  459. bounds in memory source. The first word located at "limit" is
  460. the lower boundary and the word at "limit+2" is the upper array bound.
  461. Interrupt 5 occurs if the source value is less than or higher than
  462. the source.
  463.  
  464. Clocks Size
  465. Operands 808x 286 386 486 Bytes
  466.  
  467. reg16,mem32 - nj=13 nj=10 7 2
  468. reg32,mem64 - nj=13 nj=10 7 2
  469.  
  470. - nj = no jump taken
  471.  
  472.  
  473. BSF - Bit Scan Forward (386+)
  474.  
  475. Usage: BSF dest,src
  476. Modifies flags: ZF
  477.  
  478. Scans source operand for first bit set. Sets ZF if a bit is found
  479. set and loads the destination with an index to first set bit. Clears
  480. ZF is no bits are found set. BSF scans forward across bit pattern
  481. (0-n) while BSR scans in reverse (n-0).
  482.  
  483. Clocks Size
  484. Operands 808x 286 386 486 Bytes
  485.  
  486. reg,reg - - 10+3n 6-42 3
  487. reg,mem - - 10+3n 7-43 3-7
  488. reg32,reg32 - - 10+3n 6-42 3-7
  489. reg32,mem32 - - 10+3n 7-43 3-7
  490.  
  491.  
  492. BSR - Bit Scan Reverse (386+)
  493.  
  494. Usage: BSR dest,src
  495. Modifies flags: ZF
  496.  
  497. Scans source operand for first bit set. Sets ZF if a bit is found
  498. set and loads the destination with an index to first set bit. Clears
  499. ZF is no bits are found set. BSF scans forward across bit pattern
  500. (0-n) while BSR scans in reverse (n-0).
  501.  
  502. Clocks Size
  503. Operands 808x 286 386 486 Bytes
  504.  
  505. reg,reg - - 10+3n 6-103 3
  506. reg,mem - - 10+3n 7-104 3-7
  507. reg32,reg32 - - 10+3n 6-103 3-7
  508. reg32,mem32 - - 10+3n 7-104 3-7
  509.  
  510.  
  511. BSWAP - Byte Swap (486+)
  512.  
  513. Usage: BSWAP reg32
  514. Modifies flags: none
  515.  
  516. Changes the byte order of a 32 bit register from big endian to
  517. little endian or vice versa. Result left in destination register
  518. is undefined if the operand is a 16 bit register.
  519.  
  520. Clocks Size
  521. Operands 808x 286 386 486 Bytes
  522.  
  523. reg32 - - - 1 2
  524. BT - Bit Test (386+)
  525.  
  526. Usage: BT dest,src
  527. Modifies flags: CF
  528.  
  529. The destination bit indexed by the source value is copied into the
  530. Carry Flag.
  531.  
  532. Clocks Size
  533. Operands 808x 286 386 486 Bytes
  534.  
  535. reg16,immed8 - - 3 3 4-8
  536. mem16,immed8 - - 6 6 4-8
  537. reg16,reg16 - - 3 3 3-7
  538. mem16,reg16 - - 12 12 3-7
  539.  
  540.  
  541. BTC - Bit Test with Compliment (386+)
  542.  
  543. Usage: BTC dest,src
  544. Modifies flags: CF
  545.  
  546. The destination bit indexed by the source value is copied into the
  547. Carry Flag after being complimented (inverted).
  548.  
  549. Clocks Size
  550. Operands 808x 286 386 486 Bytes
  551.  
  552. reg16,immed8 - - 6 6 4-8
  553. mem16,immed8 - - 8 8 4-8
  554. reg16,reg16 - - 6 6 3-7
  555. mem16,reg16 - - 13 13 3-7
  556.  
  557.  
  558. BTR - Bit Test with Reset (386+)
  559.  
  560. Usage: BTR dest,src
  561. Modifies flags: CF
  562.  
  563. The destination bit indexed by the source value is copied into the
  564. Carry Flag and then cleared in the destination.
  565.  
  566. Clocks Size
  567. Operands 808x 286 386 486 Bytes
  568.  
  569. reg16,immed8 - - 6 6 4-8
  570. mem16,immed8 - - 8 8 4-8
  571. reg16,reg16 - - 6 6 3-7
  572. mem16,reg16 - - 13 13 3-7
  573.  
  574.  
  575. BTS - Bit Test and Set (386+)
  576.  
  577. Usage: BTS dest,src
  578. Modifies flags: CF
  579.  
  580. The destination bit indexed by the source value is copied into the
  581. Carry Flag and then set in the destination.
  582.  
  583. Clocks Size
  584. Operands 808x 286 386 486 Bytes
  585.  
  586. reg16,immed8 - - 6 6 4-8
  587. mem16,immed8 - - 8 8 4-8
  588. reg16,reg16 - - 6 6 3-7
  589. mem16,reg16 - - 13 13 3-7
  590. CALL - Procedure Call
  591.  
  592. Usage: CALL destination
  593. Modifies flags: None
  594.  
  595. Pushes Instruction Pointer (and Code Segment for far calls) onto
  596. stack and loads Instruction Pointer with the address of proc-name.
  597. Code continues with execution at CS:IP.
  598.  
  599. Clocks
  600. Operands 808x 286 386 486
  601.  
  602. rel16 (near, IP relative) 19 7 7+m 3
  603. rel32 (near, IP relative) - - 7+m 3
  604.  
  605. reg16 (near, register indirect) 16 7 7+m 5
  606. reg32 (near, register indirect) - - 7+m 5
  607.  
  608. mem16 (near, memory indirect) - 21+EA 11 10+m 5
  609. mem32 (near, memory indirect) - - 10+m 5
  610.  
  611. ptr16:16 (far, full ptr supplied) 28 13 17+m 18
  612. ptr16:32 (far, full ptr supplied) - - 17+m 18
  613. ptr16:16 (far, ptr supplied, prot. mode) - 26 34+m 20
  614. ptr16:32 (far, ptr supplied, prot. mode) - - 34+m 20
  615. m16:16 (far, indirect) 37+EA 16 22+m 17
  616. m16:32 (far, indirect) - - 22+m 17
  617. m16:16 (far, indirect, prot. mode) - 29 38+m 20
  618. m16:32 (far, indirect, prot. mode) - - 38+m 20
  619.  
  620. ptr16:16 (task, via TSS or task gate) - 177 TS 37+TS
  621. m16:16 (task, via TSS or task gate) - 180/185 5+TS 37+TS
  622. m16:32 (task) - - TS 37+TS
  623. m16:32 (task) - - 5+TS 37+TS
  624.  
  625. ptr16:16 (gate, same privilege) - 41 52+m 35
  626. ptr16:32 (gate, same privilege) - - 52+m 35
  627. m16:16 (gate, same privilege) - 44 56+m 35
  628. m16:32 (gate, same privilege) - - 56+m 35
  629.  
  630. ptr16:16 (gate, more priv, no parm) - 82 86+m 69
  631. ptr16:32 (gate, more priv, no parm) - - 86+m 69
  632. m16:16 (gate, more priv, no parm) - 83 90+m 69
  633. m16:32 (gate, more priv, no parm) - - 90+m 69
  634.  
  635. ptr16:16 (gate, more priv, x parms) - 86+4x 94+4x+m 77+4x
  636. ptr16:32 (gate, more priv, x parms) - - 94+4x+m 77+4x
  637. m16:16 (gate, more priv, x parms) - 90+4x 98+4x+m 77+4x
  638. m16:32 (gate, more priv, x parms) - - 98+4x+m 77+4x
  639.  
  640.  
  641. CBW - Convert Byte to Word
  642.  
  643. Usage: CBW
  644. Modifies flags: None
  645.  
  646. Converts byte in AL to word Value in AX by extending sign of AL
  647. throughout register AH.
  648.  
  649. Clocks Size
  650. Operands 808x 286 386 486 Bytes
  651.  
  652. none 2 2 3 3 1
  653.  
  654.  
  655. CDQ - Convert Double to Quad (386+)
  656.  
  657. Usage: CDQ
  658. Modifies flags: None
  659.  
  660. Converts signed DWORD in EAX to a signed quad word in EDX:EAX by
  661. extending the high order bit of EAX throughout EDX
  662.  
  663. Clocks Size
  664. Operands 808x 286 386 486 Bytes
  665.  
  666. none - - 2 3 1
  667. CLC - Clear Carry
  668.  
  669. Usage: CLC
  670. Modifies flags: CF
  671.  
  672. Clears the Carry Flag.
  673.  
  674. Clocks Size
  675. Operands 808x 286 386 486 Bytes
  676.  
  677. none 2 2 2 2 1
  678.  
  679.  
  680. CLD - Clear Direction Flag
  681.  
  682. Usage: CLD
  683. Modifies flags: DF
  684.  
  685. Clears the Direction Flag causing string instructions to increment
  686. the SI and DI index registers.
  687.  
  688. Clocks Size
  689. Operands 808x 286 386 486 Bytes
  690.  
  691. none 2 2 2 2 1
  692.  
  693.  
  694. CLI - Clear Interrupt Flag (disable)
  695.  
  696. Usage: CLI
  697. Modifies flags: IF
  698.  
  699. Disables the maskable hardware interrupts by clearing the Interrupt
  700. flag. NMI's and software interrupts are not inhibited.
  701.  
  702. Clocks Size
  703. Operands 808x 286 386 486 Bytes
  704.  
  705. none 2 2 3 5 1
  706.  
  707.  
  708. CLTS - Clear Task Switched Flag (286+ privileged)
  709.  
  710. Usage: CLTS
  711. Modifies flags: None
  712.  
  713. Clears the Task Switched Flag in the Machine Status Register. This
  714. is a privileged operation and is generally used only by operating
  715. system code.
  716.  
  717. Clocks Size
  718. Operands 808x 286 386 486 Bytes
  719.  
  720. none - 2 5 7 2
  721.  
  722.  
  723. CMC - Complement Carry Flag
  724.  
  725. Usage: CMC
  726. Modifies flags: CF
  727.  
  728. Toggles (inverts) the Carry Flag
  729.  
  730. Clocks Size
  731. Operands 808x 286 386 486 Bytes
  732.  
  733. none 2 2 2 2 1
  734. CMP - Compare
  735.  
  736. Usage: CMP dest,src
  737. Modifies flags: AF CF OF PF SF ZF
  738.  
  739. Subtracts source from destination and updates the flags but does
  740. not save result. Flags can subsequently be checked for conditions.
  741.  
  742. Clocks Size
  743. Operands 808x 286 386 486 Bytes
  744.  
  745. reg,reg 3 2 2 1 2
  746. mem,reg 9+EA 7 5 2 2-4 (W88=13+EA)
  747. reg,mem 9+EA 6 6 2 2-4 (W88=13+EA)
  748. reg,immed 4 3 2 1 3-4
  749. mem,immed 10+EA 6 5 2 3-6 (W88=14+EA)
  750. accum,immed 4 3 2 1 2-3
  751.  
  752.  
  753. CMPS - Compare String (Byte, Word or Doubleword)
  754.  
  755. Usage: CMPS dest,src
  756. CMPSB
  757. CMPSW
  758. CMPSD (386+)
  759. Modifies flags: AF CF OF PF SF ZF
  760.  
  761. Subtracts destination value from source without saving results.
  762. Updates flags based on the subtraction and the index registers
  763. (E)SI and (E)DI are incremented or decremented depending on the
  764. state of the Direction Flag. CMPSB inc/decrements the index
  765. registers by 1, CMPSW inc/decrements by 2, while CMPSD increments
  766. or decrements by 4. The REP prefixes can be used to process
  767. entire data items.
  768.  
  769. Clocks Size
  770. Operands 808x 286 386 486 Bytes
  771.  
  772. dest,src 22 8 10 8 1 (W88=30)
  773.  
  774.  
  775. CMPXCHG - Compare and Exchange
  776.  
  777. Usage: CMPXCHG dest,src (486+)
  778. Modifies flags: AF CF OF PF SF ZF
  779.  
  780. Compares the accumulator (8-32 bits) with "dest". If equal the
  781. "dest" is loaded with "src", otherwise the accumulator is loaded
  782. with "dest".
  783.  
  784. Clocks Size
  785. Operands 808x 286 386 486 Bytes
  786.  
  787. reg,reg - - - 6 2
  788. mem,reg - - - 7 2
  789.  
  790. - add 3 clocks if the "mem,reg" comparison fails
  791.  
  792.  
  793. CWD - Convert Word to Doubleword
  794.  
  795. Usage: CWD
  796. Modifies flags: None
  797.  
  798. Extends sign of word in register AX throughout register DX forming
  799. a doubleword quantity in DX:AX.
  800.  
  801. Clocks Size
  802. Operands 808x 286 386 486 Bytes
  803.  
  804. none 5 2 2 3 1
  805. CWDE - Convert Word to Extended Doubleword (386+)
  806.  
  807. Usage: CWDE
  808. Modifies flags: None
  809.  
  810. Converts a signed word in AX to a signed doubleword in EAX by
  811. extending the sign bit of AX throughout EAX.
  812.  
  813. Clocks Size
  814. Operands 808x 286 386 486 Bytes
  815.  
  816. none - - 3 3 1
  817.  
  818.  
  819. DAA - Decimal Adjust for Addition
  820.  
  821. Usage: DAA
  822. Modifies flags: AF CF PF SF ZF (OF undefined)
  823.  
  824. Corrects result (in AL) of a previous BCD addition operation.
  825. Contents of AL are changed to a pair of packed decimal digits.
  826.  
  827. Clocks Size
  828. Operands 808x 286 386 486 Bytes
  829.  
  830. none 4 3 4 2 1
  831.  
  832.  
  833. DAS - Decimal Adjust for Subtraction
  834.  
  835. Usage: DAS
  836. Modifies flags: AF CF PF SF ZF (OF undefined)
  837.  
  838. Corrects result (in AL) of a previous BCD subtraction operation.
  839. Contents of AL are changed to a pair of packed decimal digits.
  840.  
  841. Clocks Size
  842. Operands 808x 286 386 486 Bytes
  843.  
  844. none 4 3 4 2 1
  845.  
  846.  
  847. DEC - Decrement
  848.  
  849. Usage: DEC dest
  850. Modifies flags: AF OF PF SF ZF
  851.  
  852. Unsigned binary subtraction of one from the destination.
  853.  
  854. Clocks Size
  855. Operands 808x 286 386 486 Bytes
  856.  
  857. reg8 3 2 2 1 2
  858. mem 15+EA 7 6 3 2-4
  859. reg16/32 3 2 2 1 1
  860.  
  861.  
  862. DIV - Divide
  863.  
  864. Usage: DIV src
  865. Modifies flags: (AF,CF,OF,PF,SF,ZF undefined)
  866.  
  867. Unsigned binary division of accumulator by source. If the source
  868. divisor is a byte value then AX is divided by "src" and the quotient
  869. is placed in AL and the remainder in AH. If source operand is a word
  870. value, then DX:AX is divided by "src" and the quotient is stored in AX
  871. and the remainder in DX.
  872.  
  873. Clocks Size
  874. Operands 808x 286 386 486 Bytes
  875.  
  876. reg8 80-90 14 14 16 2
  877. reg16 144-162 22 22 24 2
  878. reg32 - - 38 40 2
  879. mem8 (86-96)+EA 17 17 16 2-4
  880. mem16 (150-168)+EA 25 25 24 2-4 (W88=158-176+EA)
  881. mem32 - - 41 40 2-4
  882. ENTER - Make Stack Frame (80188+)
  883.  
  884. Usage: ENTER locals,level
  885. Modifies flags: None
  886.  
  887. Modifies stack for entry to procedure for high level language.
  888. Operand "locals" specifies the amount of storage to be allocated
  889. on the stack. "Level" specifies the nesting level of the routine.
  890. Paired with the LEAVE instruction, this is an efficient method of
  891. entry and exit to procedures.
  892.  
  893. Clocks Size
  894. Operands 808x 286 386 486 Bytes
  895.  
  896. immed16,0 - 11 10 14 4
  897. immed16,1 - 15 12 17 4
  898. immed16,immed8 - 12+4(n-1) 15+4(n-1) 17+3n 4
  899.  
  900.  
  901. ESC - Escape
  902.  
  903. Usage: ESC immed,src
  904. Modifies flags: None
  905.  
  906. Provides access to the data bus for other resident processors.
  907. The CPU treats it as a NOP but places memory operand on bus.
  908.  
  909. Clocks Size
  910. Operands 808x 286 386 486 Bytes
  911.  
  912. immed,reg 2 9-20 ? 2
  913. immed,mem 2 9-20 ? 2-4
  914.  
  915.  
  916. HLT - Halt CPU
  917.  
  918. Usage: HLT
  919. Modifies flags: None
  920.  
  921. Halts CPU until RESET line is activated, NMI or maskable interrupt
  922. received. The CPU becomes dormant but retains the current CS:IP
  923. for later restart.
  924.  
  925. Clocks Size
  926. Operands 808x 286 386 486 Bytes
  927.  
  928. none 2 2 5 4 1
  929.  
  930.  
  931. IDIV - Signed Integer Division
  932.  
  933. Usage: IDIV src
  934. Modifies flags: (AF,CF,OF,PF,SF,ZF undefined)
  935.  
  936. Signed binary division of accumulator by source. If source is a
  937. byte value, AX is divided by "src" and the quotient is stored in
  938. AL and the remainder in AH. If source is a word value, DX:AX is
  939. divided by "src", and the quotient is stored in AL and the
  940. remainder in DX.
  941. Clocks Size
  942. Operands 808x 286 386 486 Bytes
  943.  
  944. reg8 101-112 17 19 19 2
  945. reg16 165-184 25 27 27 2
  946. reg32 - - 43 43 2
  947. mem8 (107-118)+EA 20 22 20 2-4
  948. mem16 (171-190)+EA 38 30 28 2-4 (W88=175-194)
  949. mem32 - - 46 44 2-4
  950. IMUL - Signed Multiply
  951.  
  952. Usage: IMUL src
  953. IMUL src,immed (286+)
  954. IMUL dest,src,immed8 (286+)
  955. IMUL dest,src (386+)
  956. Modifies flags: CF OF (AF,PF,SF,ZF undefined)
  957.  
  958. Signed multiplication of accumulator by "src" with result placed
  959. in the accumulator. If the source operand is a byte value, it
  960. is multiplied by AL and the result stored in AX. If the source
  961. operand is a word value it is multiplied by AX and the result is
  962. stored in DX:AX. Other variations of this instruction allow
  963. specification of source and destination registers as well as a
  964. third immediate factor.
  965.  
  966. Clocks Size
  967. Operands 808x 286 386 486 Bytes
  968.  
  969. reg8 80-98 13 9-14 13-18 2
  970. reg16 128-154 21 9-22 13-26 2
  971. reg32 - - 9-38 12-42 2
  972. mem8 86-104 16 12-17 13-18 2-4
  973. mem16 134-160 24 12-25 13-26 2-4
  974. mem32 - - 12-41 13-42 2-4
  975. reg16,reg16 - - 9-22 13-26 3-5
  976. reg32,reg32 - - 9-38 13-42 3-5
  977. reg16,mem16 - - 12-25 13-26 3-5
  978. reg32,mem32 - - 12-41 13-42 3-5
  979. reg16,immed - 21 9-22 13-26 3
  980. reg32,immed - 21 9-38 13-42 3-6
  981. reg16,reg16,immed - 2 9-22 13-26 3-6
  982. reg32,reg32,immed - 21 9-38 13-42 3-6
  983. reg16,mem16,immed - 24 12-25 13-26 3-6
  984. reg32,mem32,immed - 24 12-41 13-42 3-6
  985.  
  986.  
  987. IN - Input Byte or Word From Port
  988.  
  989. Usage: IN accum,port
  990. Modifies flags: None
  991.  
  992. A byte, word or dword is read from "port" and placed in AL, AX or
  993. EAX respectively. If the port number is in the range of 0-255
  994. it can be specified as an immediate, otherwise the port number
  995. must be specified in DX. Valid port ranges on the PC are 0-1024,
  996. though values through 65535 may be specified and recognized by
  997. third party vendors and PS/2's.
  998.  
  999. Clocks Size
  1000. Operands 808x 286 386 486 Bytes
  1001.  
  1002. accum,immed8 10/14 5 12 14 2
  1003. accum,immed8 (PM) 6/26 8/28/27 2
  1004. accum,DX 8/12 5 13 14 1
  1005. accum,DX (PM) 7/27 8/28/27 1
  1006.  
  1007. - 386+ protected mode timings depend on privilege levels.
  1008.  
  1009. first number is the timing if: CPL ó IOPL
  1010. second number is the timing if: CPL > IOPL or in VM 86 mode (386)
  1011. CPL ò IOPL (486)
  1012. third number is the timing when: virtual mode on 486 processor
  1013. - 486 virtual mode always requires 27 cycles
  1014. INC - Increment
  1015.  
  1016. Usage: INC dest
  1017. Modifies flags: AF OF PF SF ZF
  1018.  
  1019. Adds one to destination unsigned binary operand.
  1020.  
  1021. Clocks Size
  1022. Operands 808x 286 386 486 Bytes
  1023.  
  1024. reg8 3 2 2 1 2
  1025. reg16 3 2 2 1 1
  1026. reg32 3 2 2 1 1
  1027. mem 15+EA 7 6 3 2-4 (W88=23+EA)
  1028.  
  1029.  
  1030. INS - Input String from Port (80188+)
  1031.  
  1032. Usage: INS dest,port
  1033. INSB
  1034. INSW
  1035. INSD (386+)
  1036. Modifies flags: None
  1037.  
  1038. Loads data from port to the destination ES:(E)DI (even if a
  1039. destination operand is supplied). (E)DI is adjusted by the size
  1040. of the operand and increased if the Direction Flag is cleared and
  1041. decreased if the Direction Flag is set. For INSB, INSW, INSD no
  1042. operands are allowed and the size is determined by the mnemonic.
  1043.  
  1044. Clocks Size
  1045. Operands 808x 286 386 486 Bytes
  1046.  
  1047. dest,port - 5 15 17 1
  1048. dest,port (PM) - 5 9/29 10/32/30 1
  1049. none - 5 15 17 1
  1050. none (PM) - 5 9/29 10/32/30 1
  1051.  
  1052. - 386+ protected mode timings depend on privilege levels.
  1053.  
  1054. first number is the timing if: CPL ó IOPL
  1055. second number is the timing if: CPL > IOPL
  1056. third number is the timing if: virtual mode on 486 processor
  1057.  
  1058.  
  1059. INT - Interrupt
  1060.  
  1061. Usage: INT num
  1062. Modifies flags: TF IF
  1063.  
  1064. Initiates a software interrupt by pushing the flags, clearing the
  1065. Trap and Interrupt Flags, pushing CS followed by IP and loading
  1066. CS:IP with the value found in the interrupt vector table. Execution
  1067. then begins at the location addressed by the new CS:IP
  1068.  
  1069. Clocks Size
  1070. Operands 808x 286 386 486 Bytes
  1071.  
  1072. 3 (constant) 52/72 23+m 33 26 2
  1073. 3 (prot. mode, same priv.) - 40+m 59 44 2
  1074. 3 (prot. mode, more priv.) - 78+m 99 71 2
  1075. 3 (from VM86 to PL 0) - - 119 82 2
  1076. 3 (prot. mode via task gate) - 167+m TS 37+TS 2
  1077. immed8 51/71 23+m 37 30 1
  1078. immed8 (prot. mode, same priv.) - 40+m 59 44 1
  1079. immed8 (prot. mode, more priv.) - 78+m 99 71 1
  1080. immed8 (from VM86 to PL 0) - - 119 86 1
  1081. immed8 (prot. mode, via task gate) - 167+m TS 37+TS 1
  1082. INTO - Interrupt on Overflow
  1083.  
  1084. Usage: INTO
  1085. Modifies flags: IF TF
  1086.  
  1087. If the Overflow Flag is set this instruction generates an INT 4
  1088. which causes the code addressed by 0000:0010 to be executed.
  1089.  
  1090. Clocks Size
  1091. Operands 808x 286 386 486 Bytes
  1092.  
  1093. none: jump 53/73 24+m 35 28 1
  1094. no jump 4 3 3 3
  1095. (prot. mode, same priv.) - - 59 46 1
  1096. (prot. mode, more priv.) - - 99 73 1
  1097. (from VM86 to PL 0) - - 119 84 1
  1098. (prot. mode, via task gate) - TS 39+TS 1
  1099.  
  1100.  
  1101. INVD - Invalidate Cache (486+)
  1102.  
  1103. Usage: INVD
  1104. Modifies flags: none
  1105.  
  1106. Flushes CPU internal cache. Issues special function bus cycle
  1107. which indicates to flush external caches. Data in write-back
  1108. external caches is lost.
  1109.  
  1110. Clocks Size
  1111. Operands 808x 286 386 486 Bytes
  1112.  
  1113. none - - - 4 2
  1114.  
  1115.  
  1116. INVLPG - Invalidate Translation Look-Aside Buffer Entry (486+)
  1117.  
  1118. Usage: INVLPG
  1119. Modifies flags: none
  1120.  
  1121. Invalidates a single page table entry in the Translation
  1122. Look-Aside Buffer. Intel warns that this instruction may be
  1123. implemented differently on future processors.
  1124.  
  1125. Clocks Size
  1126. Operands 808x 286 386 486 Bytes
  1127.  
  1128. none - - - 12 2
  1129.  
  1130. - timing is for TLB entry hit only.
  1131.  
  1132.  
  1133. IRET/IRETD - Interrupt Return
  1134.  
  1135. Usage: IRET
  1136. IRETD (386+)
  1137. Modifies flags: AF CF DF IF PF SF TF ZF
  1138.  
  1139. Returns control to point of interruption by popping IP, CS
  1140. and then the Flags from the stack and continues execution at
  1141. this location. CPU exception interrupts will return to the
  1142. instruction that cause the exception because the CS:IP placed
  1143. on the stack during the interrupt is the address of the offending
  1144. instruction.
  1145.  
  1146. Clocks Size
  1147. Operands 808x 286 386 486 Bytes
  1148.  
  1149. iret 32/44 17+m 22 15 1
  1150. iret (prot. mode) - 31+m 38 15 1
  1151. iret (to less privilege) - 55+m 82 36 1
  1152. iret (different task, NT=1) - 169+m TS TS+32 1
  1153. iretd - - 22/38 15 1
  1154. iretd (to less privilege) - - 82 36 1
  1155. iretd (to VM86 mode) - - 60 15 1
  1156. iretd (different task, NT=1) - - TS TS+32 1
  1157.  
  1158. - 386 timings are listed as real-mode/protected-mode
  1159. Jxx - Jump Instructions Table
  1160.  
  1161. Mnemonic Meaning Jump Condition
  1162.  
  1163. JA Jump if Above CF=0 and ZF=0
  1164. JAE Jump if Above or Equal CF=0
  1165. JB Jump if Below CF=1
  1166. JBE Jump if Below or Equal CF=1 or ZF=1
  1167. JC Jump if Carry CF=1
  1168. JCXZ Jump if CX Zero CX=0
  1169. JE Jump if Equal ZF=1
  1170. JG Jump if Greater (signed) ZF=0 and SF=OF
  1171. JGE Jump if Greater or Equal (signed) SF=OF
  1172. JL Jump if Less (signed) SF != OF
  1173. JLE Jump if Less or Equal (signed) ZF=1 or SF != OF
  1174. JMP Unconditional Jump unconditional
  1175. JNA Jump if Not Above CF=1 or ZF=1
  1176. JNAE Jump if Not Above or Equal CF=1
  1177. JNB Jump if Not Below CF=0
  1178. JNBE Jump if Not Below or Equal CF=0 and ZF=0
  1179. JNC Jump if Not Carry CF=0
  1180. JNE Jump if Not Equal ZF=0
  1181. JNG Jump if Not Greater (signed) ZF=1 or SF != OF
  1182. JNGE Jump if Not Greater or Equal (signed) SF != OF
  1183. JNL Jump if Not Less (signed) SF=OF
  1184. JNLE Jump if Not Less or Equal (signed) ZF=0 and SF=OF
  1185. JNO Jump if Not Overflow (signed) OF=0
  1186. JNP Jump if No Parity PF=0
  1187. JNS Jump if Not Signed (signed) SF=0
  1188. JNZ Jump if Not Zero ZF=0
  1189. JO Jump if Overflow (signed) OF=1
  1190. JP Jump if Parity PF=1
  1191. JPE Jump if Parity Even PF=1
  1192. JPO Jump if Parity Odd PF=0
  1193. JS Jump if Signed (signed) SF=1
  1194. JZ Jump if Zero ZF=1
  1195.  
  1196. Clocks Size
  1197. Operands 808x 286 386 486 Bytes
  1198.  
  1199. Jx: jump 16 7+m 7+m 3 2
  1200. no jump 4 3 3 1
  1201. Jx near-label - - 7+m 3 4
  1202. no jump - - 3 1
  1203.  
  1204. - It's a good programming practice to organize code so the
  1205. expected case is executed without a jump since the actual
  1206. jump takes longer to execute than falling through the test.
  1207. - see JCXZ and JMP for their respective timings
  1208.  
  1209.  
  1210. JCXZ/JECXZ - Jump if Register (E)CX is Zero
  1211.  
  1212. Usage: JCXZ label
  1213. JECXZ label (386+)
  1214. Modifies flags: None
  1215.  
  1216. Causes execution to branch to "label" if register CX is zero. Uses
  1217. unsigned comparision.
  1218.  
  1219. Clocks Size
  1220. Operands 808x 286 386 486 Bytes
  1221.  
  1222. label: jump 18 8+m 9+m 8 2
  1223. no jump 6 4 5 5
  1224. JMP - Unconditional Jump
  1225.  
  1226. Usage: JMP target
  1227. Modifies flags: None
  1228.  
  1229. Unconditionally transfers control to "label". Jumps by default
  1230. are within -32768 to 32767 bytes from the instruction following
  1231. the jump. NEAR and SHORT jumps cause the IP to be updated while FAR
  1232. jumps cause CS and IP to be updated.
  1233.  
  1234. Clocks
  1235. Operands 808x 286 386 486
  1236.  
  1237. rel8 (relative) 15 7+m 7+m 3
  1238. rel16 (relative) 15 7+m 7+m 3
  1239. rel32 (relative) - - 7+m 3
  1240. reg16 (near, register indirect) 11 7+m 7+m 5
  1241. reg32 (near, register indirect) - - 7+m 5
  1242. mem16 (near, mem indirect) 18+EA 11+m 10+m 5
  1243. mem32 (near, mem indirect) 24+EA 15+m 10+m 5
  1244. ptr16:16 (far, dword immed) - - 12+m 17
  1245. ptr16:16 (far, PM dword immed) - - 27+m 19
  1246. ptr16:16 (call gate, same priv.) - 38+m 45+m 32
  1247. ptr16:16 (via TSS) - 175+m TS 42+TS
  1248. ptr16:16 (via task gate) - 180+m TS 43+TS
  1249. mem16:16 (far, indirect) - - 43+m 13
  1250. mem16:16 (far, PM indirect) - - 31+m 18
  1251. mem16:16 (call gate, same priv.) - 41+m 49+m 31
  1252. mem16:16 (via TSS) - 178+m 5+TS 41+TS
  1253. mem16:16 (via task gate) - 183+m 5+TS 42+TS
  1254. ptr16:32 (far, 6 byte immed) - - 12+m 13
  1255. ptr16:32 (far, PM 6 byte immed) - - 27+m 18
  1256. ptr16:32 (call gate, same priv.) - - 45+m 31
  1257. ptr16:32 (via TSS) - - TS 42+TS
  1258. ptr16:32 (via task state) - - TS 43+TS
  1259. m16:32 (far, address at dword) - - 43+m 13
  1260. m16:32 (far, address at dword) - - 31+m 18
  1261. m16:32 (call gate, same priv.) - - 49+m 31
  1262. m16:32 (via TSS) - - 5+TS 41+TS
  1263. m16:32 (via task state) - - 5+TS 42+TS
  1264.  
  1265.  
  1266. LAHF - Load Register AH From Flags
  1267.  
  1268. Usage: LAHF
  1269. Modifies flags: None
  1270.  
  1271. Copies bits 0-7 of the flags register into AH. This includes flags
  1272. AF, CF, PF, SF and ZF other bits are undefined.
  1273.  
  1274. AH := SF ZF xx AF xx PF xx CF
  1275.  
  1276. Clocks Size
  1277. Operands 808x 286 386 486 Bytes
  1278.  
  1279. none 4 2 2 3 1
  1280.  
  1281.  
  1282. LAR - Load Access Rights (286+ protected)
  1283.  
  1284. Usage: LAR dest,src
  1285. Modifies flags: ZF
  1286.  
  1287. The high byte of the of the destination register is overwritten by
  1288. the value of the access rights byte and the low order byte is zeroed
  1289. depending on the selection in the source operand. The Zero Flag is
  1290. set if the load operation is successful.
  1291.  
  1292. Clocks Size
  1293. Operands 808x 286 386 486 Bytes
  1294.  
  1295. reg16,reg16 - 14 15 11 3
  1296. reg32,reg32 - - 15 11 3
  1297. reg16,mem16 - 16 16 11 3-7
  1298. reg32,mem32 - - 16 11 3-7
  1299. LDS - Load Pointer Using DS
  1300.  
  1301. Usage: LDS dest,src
  1302. Modifies flags: None
  1303.  
  1304. Loads 32-bit pointer from memory source to destination register
  1305. and DS. The offset is placed in the destination register and the
  1306. segment is placed in DS. To use this instruction the word at the
  1307. lower memory address must contain the offset and the word at the
  1308. higher address must contain the segment. This simplifies the loading
  1309. of far pointers from the stack and the interrupt vector table.
  1310.  
  1311. Clocks Size
  1312. Operands 808x 286 386 486 Bytes
  1313.  
  1314. reg16,mem32 16+EA 7 7 6 2-4
  1315. reg,mem (PM) - - 22 12 5-7
  1316.  
  1317.  
  1318. LEA - Load Effective Address
  1319.  
  1320. Usage: LEA dest,src
  1321. Modifies flags: None
  1322.  
  1323. Transfers offset address of "src" to the destination register.
  1324.  
  1325. Clocks Size
  1326. Operands 808x 286 386 486 Bytes
  1327.  
  1328. reg,mem 2+EA 3 2 1 2-4
  1329.  
  1330. - the MOV instruction can often save clock cycles when used in
  1331. place of LEA on 8088 processors
  1332.  
  1333.  
  1334. LEAVE - Restore Stack for Procedure Exit (80188+)
  1335.  
  1336. Usage: LEAVE
  1337. Modifies flags: None
  1338.  
  1339. Releases the local variables created by the previous ENTER
  1340. instruction by restoring SP and BP to their condition before
  1341. the procedure stack frame was initialized.
  1342.  
  1343. Clocks Size
  1344. Operands 808x 286 386 486 Bytes
  1345.  
  1346. none - 5 4 5 1
  1347.  
  1348.  
  1349. LES - Load Pointer Using ES
  1350.  
  1351. Usage: LES dest,src
  1352. Modifies flags: None
  1353.  
  1354. Loads 32-bit pointer from memory source to destination register
  1355. and ES. The offset is placed in the destination register and the
  1356. segment is placed in ES. To use this instruction the word at the
  1357. lower memory address must contain the offset and the word at the
  1358. higher address must contain the segment. This simplifies the loading
  1359. of far pointers from the stack and the interrupt vector table.
  1360.  
  1361. Clocks Size
  1362. Operands 808x 286 386 486 Bytes
  1363.  
  1364. reg,mem 16+EA 7 7 6 2-4 (W88=24+EA)
  1365. reg,mem (PM) - - 22 12 5-7
  1366. LFS - Load Pointer Using FS (386+)
  1367.  
  1368. Usage: LFS dest,src
  1369. Modifies flags: None
  1370.  
  1371. Loads 32-bit pointer from memory source to destination register
  1372. and FS. The offset is placed in the destination register and the
  1373. segment is placed in FS. To use this instruction the word at the
  1374. lower memory address must contain the offset and the word at the
  1375. higher address must contain the segment. This simplifies the loading
  1376. of far pointers from the stack and the interrupt vector table.
  1377.  
  1378. Clocks Size
  1379. Operands 808x 286 386 486 Bytes
  1380.  
  1381. reg,mem - - 7 6 5-7
  1382. reg,mem (PM) - - 22 12 5-7
  1383.  
  1384.  
  1385. LGDT - Load Global Descriptor Table (286+ privileged)
  1386.  
  1387. Usage: LGDT src
  1388. Modifies flags: None
  1389.  
  1390. Loads a value from an operand into the Global Descriptor Table
  1391. (GDT) register.
  1392.  
  1393. Clocks Size
  1394. Operands 808x 286 386 486 Bytes
  1395.  
  1396. mem64 - 11 11 11 5
  1397.  
  1398.  
  1399. LIDT - Load Interrupt Descriptor Table (286+ privileged)
  1400.  
  1401. Usage: LIDT src
  1402. Modifies flags: None
  1403.  
  1404. Loads a value from an operand into the Interrupt Descriptor Table
  1405. (IDT) register.
  1406.  
  1407. Clocks Size
  1408. Operands 808x 286 386 486 Bytes
  1409.  
  1410. mem64 - 12 11 11 5
  1411.  
  1412.  
  1413. LGS - Load Pointer Using GS (386+)
  1414.  
  1415. Usage: LGS dest,src
  1416. Modifies flags: None
  1417.  
  1418. Loads 32-bit pointer from memory source to destination register
  1419. and GS. The offset is placed in the destination register and the
  1420. segment is placed in GS. To use this instruction the word at the
  1421. lower memory address must contain the offset and the word at the
  1422. higher address must contain the segment. This simplifies the loading
  1423. of far pointers from the stack and the interrupt vector table.
  1424.  
  1425. Clocks Size
  1426. Operands 808x 286 386 486 Bytes
  1427.  
  1428. reg,mem - - 7 6 5-7
  1429. reg,mem (PM) - - 22 12 5-7
  1430. LLDT - Load Local Descriptor Table (286+ privileged)
  1431.  
  1432. Usage: LLDT src
  1433. Modifies flags: None
  1434.  
  1435. Loads a value from an operand into the Local Descriptor Table
  1436. Register (LDTR).
  1437.  
  1438. Clocks Size
  1439. Operands 808x 286 386 486 Bytes
  1440.  
  1441. reg16 - 17 20 11 3
  1442. mem16 - 19 24 11 5
  1443.  
  1444.  
  1445. LMSW - Load Machine Status Word (286+ privileged)
  1446.  
  1447. Usage: LMSW src
  1448. Modifies flags: None
  1449.  
  1450. Loads the Machine Status Word (MSW) from data found at "src"
  1451.  
  1452. Clocks Size
  1453. Operands 808x 286 386 486 Bytes
  1454.  
  1455. reg16 - 3 10 13 3
  1456. mem16 - 6 13 13 5
  1457.  
  1458.  
  1459. LOCK - Lock Bus
  1460.  
  1461. Usage: LOCK
  1462. LOCK: (386+ prefix)
  1463. Modifies flags: None
  1464.  
  1465. This instruction is a prefix that causes the CPU assert bus lock
  1466. signal during the execution of the next instruction. Used to
  1467. avoid two processors from updating the same data location. The
  1468. 286 always asserts lock during an XCHG with memory operands. This
  1469. should only be used to lock the bus prior to XCHG, MOV, IN and
  1470. OUT instructions.
  1471.  
  1472. Clocks Size
  1473. Operands 808x 286 386 486 Bytes
  1474.  
  1475. none 2 0 0 1 1
  1476.  
  1477.  
  1478. LODS - Load String (Byte, Word or Double)
  1479.  
  1480. Usage: LODS src
  1481. LODSB
  1482. LODSW
  1483. LODSD (386+)
  1484. Modifies flags: None
  1485.  
  1486. Transfers string element addressed by DS:SI (even if an operand is
  1487. supplied) to the accumulator. SI is incremented based on the size
  1488. of the operand or based on the instruction used. If the Direction
  1489. Flag is set SI is decremented, if the Direction Flag is clear SI
  1490. is incremented. Use with REP prefixes.
  1491.  
  1492. Clocks Size
  1493. Operands 808x 286 386 486 Bytes
  1494.  
  1495. src 12/16 5 5 5 1
  1496. LOOP - Decrement CX and Loop if CX Not Zero
  1497.  
  1498. Usage: LOOP label
  1499. Modifies flags: None
  1500.  
  1501. Decrements CX by 1 and transfers control to "label" if CX is not
  1502. Zero. The "label" operand must be within -128 or 127 bytes of the
  1503. instruction following the loop instruction
  1504.  
  1505. Clocks Size
  1506. Operands 808x 286 386 486 Bytes
  1507.  
  1508. label: jump 18 8+m 11+m 6 2
  1509. no jump 5 4 ? 2
  1510.  
  1511.  
  1512. LOOPE/LOOPZ - Loop While Equal / Loop While Zero
  1513.  
  1514. Usage: LOOPE label
  1515. LOOPZ label
  1516. Modifies flags: None
  1517.  
  1518. Decrements CX by 1 (without modifying the flags) and transfers
  1519. control to "label" if CX != 0 and the Zero Flag is set. The
  1520. "label" operand must be within -128 or 127 bytes of the instruction
  1521. following the loop instruction.
  1522.  
  1523. Clocks Size
  1524. Operands 808x 286 386 486 Bytes
  1525.  
  1526. label: jump 18 8+m 11+m 9 2
  1527. no jump 5 4 ? 6
  1528.  
  1529.  
  1530. LOOPNZ/LOOPNE - Loop While Not Zero / Loop While Not Equal
  1531.  
  1532. Usage: LOOPNZ label
  1533. LOOPNE label
  1534. Modifies flags: None
  1535.  
  1536. Decrements CX by 1 (without modifying the flags) and transfers
  1537. control to "label" if CX != 0 and the Zero Flag is clear. The
  1538. "label" operand must be within -128 or 127 bytes of the instruction
  1539. following the loop instruction.
  1540.  
  1541. Clocks Size
  1542. Operands 808x 286 386 486 Bytes
  1543.  
  1544. label: jump 19 8+m 11+m 9 2
  1545. no jump 5 4 ? 6
  1546.  
  1547.  
  1548. LSL - Load Segment Limit (286+ protected)
  1549.  
  1550. Usage: LSL dest,src
  1551. Modifies flags: ZF
  1552.  
  1553. Loads the segment limit of a selector into the destination register
  1554. if the selector is valid and visible at the current privilege level.
  1555. If loading is successful the Zero Flag is set, otherwise it is
  1556. cleared.
  1557.  
  1558. Clocks Size
  1559. Operands 808x 286 386 486 Bytes
  1560.  
  1561. reg16,reg16 - 14 20/25 10 3
  1562. reg32,reg32 - - 20/25 10 3
  1563. reg16,mem16 - 16 21/26 10 5
  1564. reg32,mem32 - - 21/26 10 5
  1565.  
  1566. - 386 times are listed "byte granular" / "page granular"
  1567. LSS - Load Pointer Using SS (386+)
  1568.  
  1569. Usage: LSS dest,src
  1570. Modifies flags: None
  1571.  
  1572. Loads 32-bit pointer from memory source to destination register
  1573. and SS. The offset is placed in the destination register and the
  1574. segment is placed in SS. To use this instruction the word at the
  1575. lower memory address must contain the offset and the word at the
  1576. higher address must contain the segment. This simplifies the loading
  1577. of far pointers from the stack and the interrupt vector table.
  1578.  
  1579. Clocks Size
  1580. Operands 808x 286 386 486 Bytes
  1581.  
  1582. reg,mem - - 7 6 5-7
  1583. reg,mem (PM) - - 22 12 5-7
  1584.  
  1585.  
  1586. LTR - Load Task Register (286+ privileged)
  1587.  
  1588. Usage: LTR src
  1589. Modifies flags: None
  1590.  
  1591. Loads the current task register with the value specified in "src".
  1592.  
  1593. Clocks Size
  1594. Operands 808x 286 386 486 Bytes
  1595.  
  1596. reg16 - 17 23 20 3
  1597. mem16 - 19 27 20 5
  1598.  
  1599.  
  1600. MOV - Move Byte or Word
  1601.  
  1602. Usage: MOV dest,src
  1603. Modifies flags: None
  1604.  
  1605. Copies byte or word from the source operand to the destination
  1606. operand. If the destination is SS interrupts are disabled except
  1607. on early buggy 808x CPUs. Some CPUs disable interrupts if the
  1608. destination is any of the segment registers
  1609.  
  1610. Clocks Size
  1611. Operands 808x 286 386 486 Bytes
  1612.  
  1613. reg,reg 2 2 2 1 2
  1614. mem,reg 9+EA 3 2 1 2-4 (W88=13+EA)
  1615. reg,mem 8+EA 5 4 1 2-4 (W88=12+EA)
  1616. mem,immed 10+EA 3 2 1 3-6 (W88=14+EA)
  1617. reg,immed 4 2 2 1 2-3
  1618. mem,accum 10 3 2 1 3 (W88=14)
  1619. accum,mem 10 5 4 1 3 (W88=14)
  1620. segreg,reg16 2 2 2 3 2
  1621. segreg,mem16 8+EA 5 5 9 2-4 (W88=12+EA)
  1622. reg16,segreg 2 2 2 3 2
  1623. mem16,segreg 9+EA 3 2 3 2-4 (W88=13+EA)
  1624. reg32,CR0/CR2/CR3 - - 6 4
  1625. CR0,reg32 - - 10 16
  1626. CR2,reg32 - - 4 4 3
  1627. CR3,reg32 - - 5 4 3
  1628. reg32,DR0/DR1/DR2/DR3 - 22 10 3
  1629. reg32,DR6/DR7 - - 22 10 3
  1630. DR0/DR1/DR2/DR3,reg32 - 22 11 3
  1631. DR6/DR7,reg32 - - 16 11 3
  1632. reg32,TR6/TR7 - - 12 4 3
  1633. TR6/TR7,reg32 - - 12 4 3
  1634. reg32,TR3 3
  1635. TR3,reg32 6
  1636.  
  1637. - when the 386 special registers are used all operands are 32 bits
  1638. MOVS - Move String (Byte or Word)
  1639.  
  1640. Usage: MOVS dest,src
  1641. MOVSB
  1642. MOVSW
  1643. MOVSD (386+)
  1644. Modifies flags: None
  1645.  
  1646. Copies data from addressed by DS:SI (even if operands are given) to
  1647. the location ES:DI destination and updates SI and DI based on the
  1648. size of the operand or instruction used. SI and DI are incremented
  1649. when the Direction Flag is cleared and decremented when the Direction
  1650. Flag is Set. Use with REP prefixes.
  1651.  
  1652. Clocks Size
  1653. Operands 808x 286 386 486 Bytes
  1654.  
  1655. dest,src 18 5 7 7 1 (W88=26)
  1656.  
  1657.  
  1658. MOVSX - Move with Sign Extend (386+)
  1659.  
  1660. Usage: MOVSX dest,src
  1661. Modifies flags: None
  1662.  
  1663. Copies the value of the source operand to the destination register
  1664. with the sign extended.
  1665.  
  1666. Clocks Size
  1667. Operands 808x 286 386 486 Bytes
  1668.  
  1669. reg,reg - - 3 3 3
  1670. reg,mem - - 6 3 3-7
  1671.  
  1672.  
  1673. MOVZX - Move with Zero Extend (386+)
  1674.  
  1675. Usage: MOVZX dest,src
  1676. Modifies flags: None
  1677.  
  1678. Copies the value of the source operand to the destination register
  1679. with the zeroes extended.
  1680.  
  1681. Clocks Size
  1682. Operands 808x 286 386 486 Bytes
  1683.  
  1684. reg,reg - - 3 3 3
  1685. reg,mem - - 6 3 3-7
  1686.  
  1687.  
  1688. MUL - Unsigned Multiply
  1689.  
  1690. Usage: MUL src
  1691. Modifies flags: CF OF (AF,PF,SF,ZF undefined)
  1692.  
  1693. Unsigned multiply of the accumulator by the source. If "src" is
  1694. a byte value, then AL is used as the other multiplicand and the
  1695. result is placed in AX. If "src" is a word value, then AX is
  1696. multiplied by "src" and DX:AX receives the result. If "src" is
  1697. a double word value, then EAX is multiplied by "src" and EDX:EAX
  1698. receives the result. The 386+ uses an early out algorithm which
  1699. makes multiplying any size value in EAX as fast as in the 8 or 16
  1700. bit registers.
  1701.  
  1702. Clocks Size
  1703. Operands 808x 286 386 486 Bytes
  1704.  
  1705. reg8 70-77 13 9-14 13-18 2
  1706. reg16 118-113 21 9-22 13-26 2
  1707. reg32 - - 9-38 13-42 2-4
  1708. mem8 (76-83)+EA 16 12-17 13-18 2-4
  1709. mem16 (124-139)+EA 24 12-25 13-26 2-4
  1710. mem32 - - 12-21 13-42 2-4
  1711. NEG - Two's Complement Negation
  1712.  
  1713. Usage: NEG dest
  1714. Modifies flags: AF CF OF PF SF ZF
  1715.  
  1716. Subtracts the destination from 0 and saves the 2s complement of
  1717. "dest" back into "dest".
  1718.  
  1719. Clocks Size
  1720. Operands 808x 286 386 486 Bytes
  1721.  
  1722. reg 3 2 2 1 2
  1723. mem 16+EA 7 6 3 2-4 (W88=24+EA)
  1724.  
  1725.  
  1726. NOP - No Operation (90h)
  1727.  
  1728. Usage: NOP
  1729. Modifies flags: None
  1730.  
  1731. This is a do nothing instruction. It results in occupation of both
  1732. space and time and is most useful for patching code segments.
  1733. (This is the original XCHG AL,AL instruction)
  1734.  
  1735. Clocks Size
  1736. Operands 808x 286 386 486 Bytes
  1737.  
  1738. none 3 3 3 1 1
  1739.  
  1740.  
  1741. NOT - One's Compliment Negation (Logical NOT)
  1742.  
  1743. Usage: NOT dest
  1744. Modifies flags: None
  1745.  
  1746. Inverts the bits of the "dest" operand forming the 1s complement.
  1747.  
  1748. Clocks Size
  1749. Operands 808x 286 386 486 Bytes
  1750.  
  1751. reg 3 2 2 1 2
  1752. mem 16+EA 7 6 3 2-4 (W88=24+EA)
  1753.  
  1754.  
  1755. OR - Inclusive Logical OR
  1756.  
  1757. Usage: OR dest,src
  1758. Modifies flags: CF OF PF SF ZF (AF undefined)
  1759.  
  1760. Logical inclusive OR of the two operands returning the result in
  1761. the destination. Any bit set in either operand will be set in the
  1762. destination.
  1763.  
  1764. Clocks Size
  1765. Operands 808x 286 386 486 Bytes
  1766.  
  1767. reg,reg 3 2 2 1 2
  1768. mem,reg 16+EA 7 7 3 2-4 (W88=24+EA)
  1769. reg,mem 9+EA 7 6 2 2-4 (W88=13+EA)
  1770. reg,immed 4 3 2 1 3-4
  1771. mem8,immed8 17+EA 7 7 3 3-6
  1772. mem16,immed16 25+EA 7 7 3 3-6
  1773. accum,immed 4 3 2 1 2-3
  1774. OUT - Output Data to Port
  1775.  
  1776. Usage: OUT port,accum
  1777. Modifies flags: None
  1778.  
  1779. Transfers byte in AL,word in AX or dword in EAX to the specified
  1780. hardware port address. If the port number is in the range of 0-255
  1781. it can be specified as an immediate. If greater than 255 then the
  1782. port number must be specified in DX. Since the PC only decodes 10
  1783. bits of the port address, values over 1023 can only be decoded by
  1784. third party vendor equipment and also map to the port range 0-1023.
  1785.  
  1786. Clocks Size
  1787. Operands 808x 286 386 486 Bytes
  1788.  
  1789. immed8,accum 10/14 3 10 16 2
  1790. immed8,accum (PM) - - 4/24 11/31/29 2
  1791. DX,accum 8/12 3 11 16 1
  1792. DX,accum (PM) - - 5/25 10/30/29 1
  1793.  
  1794. - 386+ protected mode timings depend on privilege levels.
  1795.  
  1796. first number is the timing when: CPL ó IOPL
  1797. second number is the timing when: CPL > IOPL
  1798. third number is the timing when: virtual mode on 486 processor
  1799.  
  1800.  
  1801. OUTS - Output String to Port (80188+)
  1802.  
  1803. Usage: OUTS port,src
  1804. OUTSB
  1805. OUTSW
  1806. OUTSD (386+)
  1807. Modifies flags: None
  1808.  
  1809. Transfers a byte, word or doubleword from "src" to the hardware
  1810. port specified in DX. For instructions with no operands the "src"
  1811. is located at DS:SI and SI is incremented or decremented by the
  1812. size of the operand or the size dictated by the instruction format.
  1813. When the Direction Flag is set SI is decremented, when clear, SI is
  1814. incremented. If the port number is in the range of 0-255 it can
  1815. be specified as an immediate. If greater than 255 then the port
  1816. number must be specified in DX. Since the PC only decodes 10 bits
  1817. of the port address, values over 1023 can only be decoded by third
  1818. party vendor equipment and also map to the port range 0-1023.
  1819.  
  1820. Clocks Size
  1821. Operands 808x 286 386 486 Bytes
  1822.  
  1823. port,src - 5 14 17 1
  1824. port,src (PM) - - 8/28 10/32/30 1
  1825.  
  1826. - 386+ protected mode timings depend on privilege levels.
  1827.  
  1828. first number is the timing when: CPL ó IOPL
  1829. second number is the timing when: CPL > IOPL
  1830. third number is the timing when: virtual mode on 486 processor
  1831.  
  1832.  
  1833. POP - Pop Word off Stack
  1834.  
  1835. Usage: POP dest
  1836. Modifies flags: None
  1837.  
  1838. Transfers word at the current stack top (SS:SP) to the destination
  1839. then increments SP by two to point to the new stack top. CS is not
  1840. a valid destination.
  1841.  
  1842. Clocks Size
  1843. Operands 808x 286 386 486 Bytes
  1844.  
  1845. reg16 8 5 4 4 1
  1846. reg32 4 - - 4 1
  1847. segreg 8 5 7 3 1
  1848. mem16 17+EA 5 5 6 2-4
  1849. mem32 5 - - 6 2-4
  1850. POPA/POPAD - Pop All Registers onto Stack (80188+)
  1851.  
  1852. Usage: POPA
  1853. POPAD (386+)
  1854. Modifies flags: None
  1855.  
  1856. Pops the top 8 words off the stack into the 8 general purpose 16/32
  1857. bit registers. Registers are popped in the following order: (E)DI,
  1858. (E)SI, (E)BP, (E)SP, (E)DX, (E)CX and (E)AX. The (E)SP value popped
  1859. from the stack is actually discarded.
  1860.  
  1861. Clocks Size
  1862. Operands 808x 286 386 486 Bytes
  1863.  
  1864. none - 19 24 9 1
  1865.  
  1866.  
  1867. POPF/POPFD - Pop Flags off Stack
  1868.  
  1869. Usage: POPF
  1870. POPFD (386+)
  1871. Modifies flags: all flags
  1872.  
  1873. Pops word/doubleword from stack into the Flags Register and then
  1874. increments SP by 2 (for POPF) or 4 (for POPFD).
  1875.  
  1876. Clocks Size
  1877. Operands 808x 286 386 486 Bytes
  1878.  
  1879. none 8/12 5 5 9 1 (W88=12)
  1880. none (PM) - - 5 6 1
  1881.  
  1882.  
  1883. PUSH - Push Word onto Stack
  1884.  
  1885. Usage: PUSH src
  1886. PUSH immed (80188+ only)
  1887. Modifies flags: None
  1888.  
  1889. Decrements SP by the size of the operand (two or four, byte values
  1890. are sign extended) and transfers one word from source to the stack
  1891. top (SS:SP).
  1892.  
  1893. Clocks Size
  1894. Operands 808x 286 386 486 Bytes
  1895.  
  1896. reg16 11/15 3 2 1 1
  1897. reg32 - - 2 1 1
  1898. mem16 16+EA 5 5 4 2-4 (W88=24+EA)
  1899. mem32 - - 5 4 2-4
  1900. segreg 10/14 3 2 3 1
  1901. immed - 3 2 1 2-3
  1902.  
  1903.  
  1904. PUSHA/PUSHAD - Push All Registers onto Stack (80188+)
  1905.  
  1906. Usage: PUSHA
  1907. PUSHAD (386+)
  1908. Modifies flags: None
  1909.  
  1910. Pushes all general purpose registers onto the stack in the following
  1911. order: (E)AX, (E)CX, (E)DX, (E)BX, (E)SP, (E)BP, (E)SI, (E)DI. The
  1912. value of SP is the value before the actual push of SP.
  1913.  
  1914. Clocks Size
  1915. Operands 808x 286 386 486 Bytes
  1916.  
  1917. none - 19 24 11 1
  1918. PUSHF/PUSHFD - Push Flags onto Stack
  1919.  
  1920. Usage: PUSHF
  1921. PUSHFD (386+)
  1922. Modifies flags: None
  1923.  
  1924. Transfers the Flags Register onto the stack. PUSHF saves a 16 bit
  1925. value while PUSHFD saves a 32 bit value.
  1926.  
  1927. Clocks Size
  1928. Operands 808x 286 386 486 Bytes
  1929.  
  1930. none 10/14 3 4 4 1
  1931. none (PM) - - 4 3 1
  1932.  
  1933.  
  1934. RCL - Rotate Through Carry Left
  1935.  
  1936. Usage: RCL dest,count
  1937. Modifies flags: CF OF
  1938.  
  1939. ÚÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  1940. ÚÄþ³C³<þÄÄþ³7 <ÄÄÄÄÄÄÄÄÄÄ 0³<Ä¿
  1941. ³ ÀÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³
  1942. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  1943.  
  1944. Rotates the bits in the destination to the left "count" times with
  1945. all data pushed out the left side re-entering on the right. The
  1946. Carry Flag holds the last bit rotated out.
  1947.  
  1948. Clocks Size
  1949. Operands 808x 286 386 486 Bytes
  1950.  
  1951. reg,1 2 2 9 3 2
  1952. mem,1 15+EA 7 10 4 2-4 (W88=23+EA)
  1953. reg,CL 8+4n 5+n 9 8-30 2
  1954. mem,CL 20+EA+4n 8+n 10 9-31 2-4 (W88=28+EA+4n)
  1955. reg,immed8 - 5+n 9 8-30 3
  1956. mem,immed8 - 8+n 10 9-31 3-5
  1957.  
  1958.  
  1959. RCR - Rotate Through Carry Right
  1960.  
  1961. Usage: RCR dest,count
  1962. Modifies flags: CF OF
  1963.  
  1964. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄ¿
  1965. ÚÄ>³7 þÄÄÄÄÄÄÄÄÄ> 0³þÄÄÄ>³C³þÄ¿
  1966. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÙ ³
  1967. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  1968.  
  1969. Rotates the bits in the destination to the right "count" times with
  1970. all data pushed out the right side re-entering on the left. The
  1971. Carry Flag holds the last bit rotated out.
  1972.  
  1973. Clocks Size
  1974. Operands 808x 286 386 486 Bytes
  1975.  
  1976. reg,1 2 2 9 3 2
  1977. mem,1 15+EA 7 10 4 2-4 (W88=23+EA)
  1978. reg,CL 8+4n 5+n 9 8-30 2
  1979. mem,CL 20+EA+4n 8+n 10 9-31 2-4 (W88=28+EA+4n)
  1980. reg,immed8 - 5+n 9 8-30 3
  1981. mem,immed8 - 8+n 10 9-31 3-5
  1982. REP - Repeat String Operation
  1983.  
  1984. Usage: REP
  1985. Modifies flags: None
  1986.  
  1987. Repeats execution of string instructions while CX != 0. After
  1988. each string operation, CX is decremented and the Zero Flag is
  1989. tested. The combination of a repeat prefix and a segment override
  1990. on CPU's before the 386 may result in errors if an interrupt occurs
  1991. before CX=0. The following code shows code that is susceptible to
  1992. this and how to avoid it:
  1993.  
  1994. again: rep movs byte ptr ES:[DI],ES:[SI] ; vulnerable instr.
  1995. jcxz next ; continue if REP successful
  1996. loop again ; interrupt goofed count
  1997. next:
  1998.  
  1999. Clocks Size
  2000. Operands 808x 286 386 486 Bytes
  2001.  
  2002. none 2 2 2 1
  2003.  
  2004.  
  2005. REPE/REPZ - Repeat Equal / Repeat Zero
  2006.  
  2007. Usage: REPE
  2008. REPZ
  2009. Modifies flags: None
  2010.  
  2011. Repeats execution of string instructions while CX != 0 and the Zero
  2012. Flag is set. CX is decremented and the Zero Flag tested after
  2013. each string operation. The combination of a repeat prefix and a
  2014. segment override on processors other than the 386 may result in
  2015. errors if an interrupt occurs before CX=0.
  2016.  
  2017. Clocks Size
  2018. Operands 808x 286 386 486 Bytes
  2019.  
  2020. none 2 2 2 1
  2021.  
  2022.  
  2023. REPNE/REPNZ - Repeat Not Equal / Repeat Not Zero
  2024.  
  2025. Usage: REPNE
  2026. REPNZ
  2027. Modifies flags: None
  2028.  
  2029. Repeats execution of string instructions while CX != 0 and the Zero
  2030. Flag is clear. CX is decremented and the Zero Flag tested after
  2031. each string operation. The combination of a repeat prefix and a
  2032. segment override on processors other than the 386 may result in
  2033. errors if an interrupt occurs before CX=0.
  2034.  
  2035. Clocks Size
  2036. Operands 808x 286 386 486 Bytes
  2037.  
  2038. none 2 2 2 1
  2039. RET/RETF - Return From Procedure
  2040.  
  2041. Usage: RET nBytes
  2042. RETF nBytes
  2043. RETN nBytes
  2044. Modifies flags: None
  2045.  
  2046. Transfers control from a procedure back to the instruction address
  2047. saved on the stack. "n bytes" is an optional number of bytes to
  2048. release. Far returns pop the IP followed by the CS, while near
  2049. returns pop only the IP register.
  2050.  
  2051. Clocks Size
  2052. Operands 808x 286 386 486 Bytes
  2053.  
  2054. retn 16/20 11+m 10+m 5 1
  2055. retn immed 20/24 11+m 10+m 5 3
  2056. retf 26/34 15+m 18+m 13 1
  2057. retf (PM, same priv.) - 32+m 18 1
  2058. retf (PM, lesser priv.) - 68 33 1
  2059. retf immed 25/33 15+m 18+m 14 3
  2060. retf immed (PM, same priv.) 32+m 17 1
  2061. retf immed (PM, lesser priv.) 68 33 1
  2062.  
  2063.  
  2064. ROL - Rotate Left
  2065.  
  2066. Usage: ROL dest,count
  2067. Modifies flags: CF OF
  2068.  
  2069. ÚÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
  2070. ³C³<þÂÄþ³7 <ÄÄÄÄÄÄÄÄÄÄ 0³<Ä¿
  2071. ÀÄÙ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³
  2072. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  2073.  
  2074. Rotates the bits in the destination to the left "count" times with
  2075. all data pushed out the left side re-entering on the right. The
  2076. Carry Flag will contain the value of the last bit rotated out.
  2077.  
  2078. Clocks Size
  2079. Operands 808x 286 386 486 Bytes
  2080.  
  2081. reg,1 2 2 3 3 2
  2082. mem,1 15+EA 7 7 4 2-4 (W88=23+EA)
  2083. reg,CL 8+4n 5+n 3 3 2
  2084. mem,CL 20+EA+4n 8+n 7 4 2-4 (W88=28+EA+4n)
  2085. reg,immed8 - 5+n 3 2 3
  2086. mem,immed8 - 8+n 7 4 3-5
  2087.  
  2088.  
  2089. ROR - Rotate Right
  2090.  
  2091. Usage: ROR dest,count
  2092. Modifies flags: CF OF
  2093.  
  2094. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄ¿
  2095. ÚÄ>³7 þÄÄÄÄÄÄÄÄÄ> 0³þÄÂÄ>³C³
  2096. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ÀÄÙ
  2097. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  2098.  
  2099. Rotates the bits in the destination to the right "count" times with
  2100. all data pushed out the right side re-entering on the left. The
  2101. Carry Flag will contain the value of the last bit rotated out.
  2102.  
  2103. Clocks Size
  2104. Operands 808x 286 386 486 Bytes
  2105.  
  2106. reg,1 2 2 3 3 2
  2107. mem,1 15+EA 7 7 4 2-4 (W88=23+EA)
  2108. reg,CL 8+4n 5+n 3 3 2
  2109. mem,CL 20+EA+4n 8+n 7 4 2-4 (W88=28+EA+4n)
  2110. reg,immed8 - 5+n 3 2 3
  2111. mem,immed8 - 8+n 7 4 3-5
  2112. SAHF - Store AH Register into FLAGS
  2113.  
  2114. Usage: SAHF
  2115. Modifies flags: AF CF PF SF ZF
  2116.  
  2117. Transfers bits 0-7 of AH into the Flags Register. This includes
  2118. AF, CF, PF, SF and ZF.
  2119.  
  2120. Clocks Size
  2121. Operands 808x 286 386 486 Bytes
  2122.  
  2123. none 4 2 3 2 1
  2124.  
  2125.  
  2126. SAL/SHL - Shift Arithmetic Left / Shift Logical Left
  2127.  
  2128. Usage: SAL dest,count
  2129. SHL dest,count
  2130. Modifies flags: CF OF PF SF ZF (AF undefined)
  2131.  
  2132. ÚÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄ¿
  2133. ³C³<ÄÄÄþ³7 <ÄÄÄÄÄÄÄÄÄÄ 0³<ÄÄÄþ³0³
  2134. ÀÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÙ
  2135.  
  2136. Shifts the destination left by "count" bits with zeroes shifted
  2137. in on right. The Carry Flag contains the last bit shifted out.
  2138.  
  2139. Clocks Size
  2140. Operands 808x 286 386 486 Bytes
  2141.  
  2142. reg,1 2 2 3 3 2
  2143. mem,1 15+EA 7 7 4 2-4 (W88=23+EA)
  2144. reg,CL 8+4n 5+n 3 3 2
  2145. mem,CL 20+EA+4n 8+n 7 4 2-4 (W88=28+EA+4n)
  2146. reg,immed8 - 5+n 3 2 3
  2147. mem,immed8 - 8+n 7 4 3-5
  2148.  
  2149.  
  2150. SAR - Shift Arithmetic Right
  2151.  
  2152. Usage: SAR dest,count
  2153. Modifies flags: CF OF PF SF ZF (AF undefined)
  2154.  
  2155. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄ¿
  2156. ÚÄþ³7 ÄÄÄÄÄÄÄÄÄÄ> 0³ÄÄÄþ>³C³
  2157. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÙ
  2158. ÀÄÄÄ^
  2159.  
  2160. Shifts the destination right by "count" bits with the current sign
  2161. bit replicated in the leftmost bit. The Carry Flag contains the
  2162. last bit shifted out.
  2163.  
  2164. Clocks Size
  2165. Operands 808x 286 386 486 Bytes
  2166.  
  2167. reg,1 2 2 3 3 2
  2168. mem,1 15+EA 7 7 4 2-4 (W88=23+EA)
  2169. reg,CL 8+4n 5+n 3 3 2
  2170. mem,CL 20+EA+4n 8+n 7 4 2-4 (W88=28+EA+4n)
  2171. reg,immed8 - 5+n 3 2 3
  2172. mem,immed8 - 8+n 7 4 3-5
  2173. SBB - Subtract with Borrow/Carry
  2174.  
  2175. Usage: SBB dest,src
  2176. Modifies flags: AF CF OF PF SF ZF
  2177.  
  2178. Subtracts the source from the destination, and subtracts 1 extra if
  2179. the Carry Flag is set. Results are returned in "dest".
  2180.  
  2181. Clocks Size
  2182. Operands 808x 286 386 486 Bytes
  2183.  
  2184. reg,reg 3 2 2 1 2
  2185. mem,reg 16+EA 7 6 3 2-4 (W88=24+EA)
  2186. reg,mem 9+EA 7 7 2 2-4 (W88=13+EA)
  2187. reg,immed 4 3 2 1 3-4
  2188. mem,immed 17+EA 7 7 3 3-6 (W88=25+EA)
  2189. accum,immed 4 3 2 1 2-3
  2190.  
  2191.  
  2192. SCAS - Scan String (Byte, Word or Doubleword)
  2193.  
  2194. Usage: SCAS string
  2195. SCASB
  2196. SCASW
  2197. SCASD (386+)
  2198. Modifies flags: AF CF OF PF SF ZF
  2199.  
  2200. Compares value at ES:DI (even if operand is specified) from the
  2201. accumulator and sets the flags similar to a subtraction. DI is
  2202. incremented/decremented based on the instruction format (or
  2203. operand size) and the state of the Direction Flag. Use with REP
  2204. prefixes.
  2205.  
  2206. Clocks Size
  2207. Operands 808x 286 386 486 Bytes
  2208.  
  2209. string 15 7 7 6 1 (W88=19)
  2210.  
  2211.  
  2212. SETAE/SETNB - Set if Above or Equal / Set if Not Below (386+)
  2213.  
  2214. Usage: SETAE dest
  2215. SETNB dest
  2216. (unsigned, 386+)
  2217. Modifies flags: none
  2218.  
  2219. Sets the byte in the operand to 1 if the Carry Flag is clear
  2220. otherwise sets the operand to 0.
  2221.  
  2222. Clocks Size
  2223. Operands 808x 286 386 486 Bytes
  2224.  
  2225. reg8 - - 4 3 3
  2226. mem8 - - 5 4 3
  2227.  
  2228.  
  2229. SETB/SETNAE - Set if Below / Set if Not Above or Equal (386+)
  2230.  
  2231. Usage: SETB dest
  2232. SETNAE dest
  2233. (unsigned, 386+)
  2234. Modifies flags: none
  2235.  
  2236. Sets the byte in the operand to 1 if the Carry Flag is set
  2237. otherwise sets the operand to 0.
  2238.  
  2239. Clocks Size
  2240. Operands 808x 286 386 486 Bytes
  2241.  
  2242. reg8 - - 4 3 3
  2243. mem8 - - 5 4 3
  2244. SETBE/SETNA - Set if Below or Equal / Set if Not Above (386+)
  2245.  
  2246. Usage: SETBE dest
  2247. SETNA dest
  2248. (unsigned, 386+)
  2249. Modifies flags: none
  2250.  
  2251. Sets the byte in the operand to 1 if the Carry Flag or the Zero
  2252. Flag is set, otherwise sets the operand to 0.
  2253.  
  2254. Clocks Size
  2255. Operands 808x 286 386 486 Bytes
  2256.  
  2257. reg8 - - 4 3 3
  2258. mem8 - - 5 4 3
  2259.  
  2260.  
  2261. SETE/SETZ - Set if Equal / Set if Zero (386+)
  2262.  
  2263. Usage: SETE dest
  2264. SETZ dest
  2265. Modifies flags: none
  2266.  
  2267. Sets the byte in the operand to 1 if the Zero Flag is set,
  2268. otherwise sets the operand to 0.
  2269.  
  2270. Clocks Size
  2271. Operands 808x 286 386 486 Bytes
  2272.  
  2273. reg8 - - 4 3 3
  2274. mem8 - - 5 4 3
  2275.  
  2276.  
  2277. SETNE/SETNZ - Set if Not Equal / Set if Not Zero (386+)
  2278.  
  2279. Usage: SETNE dest
  2280. SETNZ dest
  2281. Modifies flags: none
  2282.  
  2283. Sets the byte in the operand to 1 if the Zero Flag is clear,
  2284. otherwise sets the operand to 0.
  2285.  
  2286. Clocks Size
  2287. Operands 808x 286 386 486 Bytes
  2288.  
  2289. reg8 - - 4 3 3
  2290. mem8 - - 5 4 3
  2291.  
  2292.  
  2293. SETL/SETNGE - Set if Less / Set if Not Greater or Equal (386+)
  2294.  
  2295. Usage: SETL dest
  2296. SETNGE dest
  2297. (signed, 386+)
  2298. Modifies flags: none
  2299.  
  2300. Sets the byte in the operand to 1 if the Sign Flag is not equal
  2301. to the Overflow Flag, otherwise sets the operand to 0.
  2302.  
  2303. Clocks Size
  2304. Operands 808x 286 386 486 Bytes
  2305.  
  2306. reg8 - - 4 3 3
  2307. mem8 - - 5 4 3
  2308. SETGE/SETNL - Set if Greater or Equal / Set if Not Less (386+)
  2309.  
  2310. Usage: SETGE dest
  2311. SETNL dest
  2312. (signed, 386+)
  2313. Modifies flags: none
  2314.  
  2315. Sets the byte in the operand to 1 if the Sign Flag equals the
  2316. Overflow Flag, otherwise sets the operand to 0.
  2317.  
  2318. Clocks Size
  2319. Operands 808x 286 386 486 Bytes
  2320.  
  2321. reg8 - - 4 3 3
  2322. mem8 - - 5 4 3
  2323.  
  2324.  
  2325. SETLE/SETNG - Set if Less or Equal / Set if Not greater or Equal (386+)
  2326.  
  2327. Usage: SETLE dest
  2328. SETNG dest
  2329. (signed, 386+)
  2330. Modifies flags: none
  2331.  
  2332. Sets the byte in the operand to 1 if the Zero Flag is set or the
  2333. Sign Flag is not equal to the Overflow Flag, otherwise sets the
  2334. operand to 0.
  2335.  
  2336. Clocks Size
  2337. Operands 808x 286 386 486 Bytes
  2338.  
  2339. reg8 - - 4 3 3
  2340. mem8 - - 5 4 3
  2341.  
  2342.  
  2343. SETG/SETNLE - Set if Greater / Set if Not Less or Equal (386+)
  2344.  
  2345. Usage: SETG dest
  2346. SETNLE dest
  2347. (signed, 386+)
  2348. Modifies flags: none
  2349.  
  2350. Sets the byte in the operand to 1 if the Zero Flag is clear or the
  2351. Sign Flag equals to the Overflow Flag, otherwise sets the operand
  2352. to 0.
  2353.  
  2354. Clocks Size
  2355. Operands 808x 286 386 486 Bytes
  2356.  
  2357. reg8 - - 4 3 3
  2358. mem8 - - 5 4 3
  2359.  
  2360.  
  2361. SETS - Set if Signed (386+)
  2362.  
  2363. Usage: SETS dest
  2364. Modifies flags: none
  2365.  
  2366. Sets the byte in the operand to 1 if the Sign Flag is set, otherwise
  2367. sets the operand to 0.
  2368.  
  2369. Clocks Size
  2370. Operands 808x 286 386 486 Bytes
  2371.  
  2372. reg8 - - 4 3 3
  2373. mem8 - - 5 4 3
  2374. SETNS - Set if Not Signed (386+)
  2375.  
  2376. Usage: SETNS dest
  2377. Modifies flags: none
  2378.  
  2379. Sets the byte in the operand to 1 if the Sign Flag is clear,
  2380. otherwise sets the operand to 0.
  2381.  
  2382. Clocks Size
  2383. Operands 808x 286 386 486 Bytes
  2384.  
  2385. reg8 - - 4 3 3
  2386. mem8 - - 5 4 3
  2387.  
  2388.  
  2389. SETC - Set if Carry (386+)
  2390.  
  2391. Usage: SETC dest
  2392. Modifies flags: none
  2393.  
  2394. Sets the byte in the operand to 1 if the Carry Flag is set,
  2395. otherwise sets the operand to 0.
  2396.  
  2397. Clocks Size
  2398. Operands 808x 286 386 486 Bytes
  2399.  
  2400. reg8 - - 4 3 3
  2401. mem8 - - 5 4 3
  2402.  
  2403.  
  2404. SETNC - Set if Not Carry (386+)
  2405.  
  2406. Usage: SETNC dest
  2407. Modifies flags: none
  2408.  
  2409. Sets the byte in the operand to 1 if the Carry Flag is clear,
  2410. otherwise sets the operand to 0.
  2411.  
  2412. Clocks Size
  2413. Operands 808x 286 386 486 Bytes
  2414.  
  2415. reg8 - - 4 3 3
  2416. mem8 - - 5 4 3
  2417.  
  2418.  
  2419. SETO - Set if Overflow (386+)
  2420.  
  2421. Usage: SETO dest
  2422. Modifies flags: none
  2423.  
  2424. Sets the byte in the operand to 1 if the Overflow Flag is set,
  2425. otherwise sets the operand to 0.
  2426.  
  2427. Clocks Size
  2428. Operands 808x 286 386 486 Bytes
  2429.  
  2430. reg8 - - 4 3 3
  2431. mem8 - - 5 4 3
  2432.  
  2433.  
  2434. SETNO - Set if Not Overflow (386+)
  2435.  
  2436. Usage: SETNO dest
  2437. Modifies flags: none
  2438.  
  2439. Sets the byte in the operand to 1 if the Overflow Flag is clear,
  2440. otherwise sets the operand to 0.
  2441.  
  2442. Clocks Size
  2443. Operands 808x 286 386 486 Bytes
  2444.  
  2445. reg8 - - 4 3 3
  2446. mem8 - - 5 4 3
  2447. SETP/SETPE - Set if Parity / Set if Parity Even (386+)
  2448.  
  2449. Usage: SETP dest
  2450. SETPE dest
  2451. Modifies flags: none
  2452.  
  2453. Sets the byte in the operand to 1 if the Parity Flag is set,
  2454. otherwise sets the operand to 0.
  2455.  
  2456. Clocks Size
  2457. Operands 808x 286 386 486 Bytes
  2458.  
  2459. reg8 - - 4 3 3
  2460. mem8 - - 5 4 3
  2461.  
  2462.  
  2463. SETNP/SETPO - Set if No Parity / Set if Parity Odd (386+)
  2464.  
  2465. Usage: SETNP dest
  2466. SETPO dest
  2467. Modifies flags: none
  2468.  
  2469. Sets the byte in the operand to 1 if the Parity Flag is clear,
  2470. otherwise sets the operand to 0.
  2471.  
  2472. Clocks Size
  2473. Operands 808x 286 386 486 Bytes
  2474.  
  2475. reg8 - - 4 3 3
  2476. mem8 - - 5 4 3
  2477.  
  2478.  
  2479. SGDT - Store Global Descriptor Table (286+ privileged)
  2480.  
  2481. Usage: SGDT dest
  2482. Modifies flags: none
  2483.  
  2484. Stores the Global Descriptor Table (GDT) Register into the
  2485. specified operand.
  2486.  
  2487. Clocks Size
  2488. Operands 808x 286 386 486 Bytes
  2489.  
  2490. mem64 - 11 9 10 5
  2491.  
  2492.  
  2493. SIDT - Store Interrupt Descriptor Table (286+ privileged)
  2494.  
  2495. Usage: SIDT dest
  2496. Modifies flags: none
  2497.  
  2498. Stores the Interrupt Descriptor Table (IDT) Register into the
  2499. specified operand.
  2500.  
  2501. Clocks Size
  2502. Operands 808x 286 386 486 Bytes
  2503.  
  2504. mem64 - 12 9 10 5
  2505.  
  2506.  
  2507. SHL - Shift Logical Left
  2508.  
  2509. See: SAL
  2510. SHR - Shift Logical Right
  2511.  
  2512. Usage: SHR dest,count
  2513. Modifies flags: CF OF PF SF ZF (AF undefined)
  2514.  
  2515. ÚÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄ¿
  2516. ³0³ÄÄÄþ>³7 ÄÄÄÄÄÄÄÄÄÄ> 0³ÄÄÄþ>³C³
  2517. ÀÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÙ
  2518.  
  2519. Shifts the destination right by "count" bits with zeroes shifted
  2520. in on the left. The Carry Flag contains the last bit shifted out.
  2521.  
  2522. Clocks Size
  2523. Operands 808x 286 386 486 Bytes
  2524.  
  2525. reg,1 2 2 3 2
  2526. mem,1 15+EA 7 7 2-4 (W88=23+EA)
  2527. reg,CL 8+4n 5+n 3 2
  2528. mem,CL 20+EA+4n 8+n 7 2-4 (W88=28+EA+4n)
  2529. reg,immed8 - 5+n 3 3
  2530. mem,immed8 - 8+n 7 3-5
  2531.  
  2532.  
  2533. SHLD/SHRD - Double Precision Shift (386+)
  2534.  
  2535. Usage: SHLD dest,src,count
  2536. SHRD dest,src,count
  2537. Modifies flags: CF PF SF ZF (OF,AF undefined)
  2538.  
  2539. SHLD shifts "dest" to the left "count" times and the bit positions
  2540. opened are filled with the most significant bits of "src". SHRD
  2541. shifts "dest" to the right "count" times and the bit positions
  2542. opened are filled with the least significant bits of the second
  2543. operand. Only the 5 lower bits of "count" are used.
  2544.  
  2545. Clocks Size
  2546. Operands 808x 286 386 486 Bytes
  2547.  
  2548. reg16,reg16,immed8 - - 3 2 4
  2549. reg32,reg32,immed8 - - 3 2 4
  2550. mem16,reg16,immed8 - - 7 3 6
  2551. mem32,reg32,immed8 - - 7 3 6
  2552. reg16,reg16,CL - - 3 3 3
  2553. reg32,reg32,CL - - 3 3 3
  2554. mem16,reg16,CL - - 7 4 5
  2555. mem32,reg32,CL - - 7 4 5
  2556.  
  2557.  
  2558. SLDT - Store Local Descriptor Table (286+ privileged)
  2559.  
  2560. Usage: SLDT dest
  2561. Modifies flags: none
  2562.  
  2563. Stores the Local Descriptor Table (LDT) Register into the
  2564. specified operand.
  2565.  
  2566. Clocks Size
  2567. Operands 808x 286 386 486 Bytes
  2568.  
  2569. reg16 - 2 2 2 3
  2570. mem16 - 2 2 3 5
  2571.  
  2572.  
  2573. SMSW - Store Machine Status Word (286+ privileged)
  2574.  
  2575. Usage: SMSW dest
  2576. Modifies flags: none
  2577.  
  2578. Store Machine Status Word (MSW) into "dest".
  2579.  
  2580. Clocks Size
  2581. Operands 808x 286 386 486 Bytes
  2582.  
  2583. reg16 - 2 10 2 3
  2584. mem16 - 3 3 3 5
  2585. STC - Set Carry
  2586.  
  2587. Usage: STC
  2588. Modifies flags: CF
  2589.  
  2590. Sets the Carry Flag to 1.
  2591.  
  2592. Clocks Size
  2593. Operands 808x 286 386 486 Bytes
  2594.  
  2595. none 2 2 2 2 1
  2596.  
  2597.  
  2598. STD - Set Direction Flag
  2599.  
  2600. Usage: STD
  2601. Modifies flags: DF
  2602.  
  2603. Sets the Direction Flag to 1 causing string instructions to
  2604. auto-decrement SI and DI instead of auto-increment.
  2605.  
  2606. Clocks Size
  2607. Operands 808x 286 386 486 Bytes
  2608.  
  2609. none 2 2 2 2 1
  2610.  
  2611.  
  2612. STI - Set Interrupt Flag (Enable Interrupts)
  2613.  
  2614. Usage: STI
  2615. Modifies flags: IF
  2616.  
  2617. Sets the Interrupt Flag to 1, which enables recognition of all
  2618. hardware interrupts. If an interrupt is generated by a hardware
  2619. device, an End of Interrupt (EOI) must also be issued to enable
  2620. other hardware interrupts of the same or lower priority.
  2621.  
  2622. Clocks Size
  2623. Operands 808x 286 386 486 Bytes
  2624.  
  2625. none 2 2 2 5 1
  2626.  
  2627.  
  2628. STOS - Store String (Byte, Word or Doubleword)
  2629.  
  2630. Usage: STOS dest
  2631. STOSB
  2632. STOSW
  2633. STOSD
  2634. Modifies flags: None
  2635.  
  2636. Stores value in accumulator to location at ES:(E)DI (even if operand
  2637. is given). (E)DI is incremented/decremented based on the size of
  2638. the operand (or instruction format) and the state of the Direction
  2639. Flag. Use with REP prefixes.
  2640.  
  2641. Clocks Size
  2642. Operands 808x 286 386 486 Bytes
  2643.  
  2644. dest 11 3 4 5 1 (W88=15)
  2645.  
  2646.  
  2647. STR - Store Task Register (286+ privileged)
  2648.  
  2649. Usage: STR dest
  2650. Modifies flags: None
  2651.  
  2652. Stores the current Task Register to the specified operand.
  2653.  
  2654. Clocks Size
  2655. Operands 808x 286 386 486 Bytes
  2656.  
  2657. reg16 - 2 2 2 3
  2658. mem16 - 3 2 3 5
  2659. SUB - Subtract
  2660.  
  2661. Usage: SUB dest,src
  2662. Modifies flags: AF CF OF PF SF ZF
  2663.  
  2664. The source is subtracted from the destination and the result is
  2665. stored in the destination.
  2666.  
  2667. Clocks Size
  2668. Operands 808x 286 386 486 Bytes
  2669.  
  2670. reg,reg 3 2 2 1 2
  2671. mem,reg 16+EA 7 6 3 2-4 (W88=24+EA)
  2672. reg,mem 9+EA 7 7 2 2-4 (W88=13+EA)
  2673. reg,immed 4 3 2 1 3-4
  2674. mem,immed 17+EA 7 7 3 3-6 (W88=25+EA)
  2675. accum,immed 4 3 2 1 2-3
  2676.  
  2677.  
  2678. TEST - Test For Bit Pattern
  2679.  
  2680. Usage: TEST dest,src
  2681. Modifies flags: CF OF PF SF ZF (AF undefined)
  2682.  
  2683. Performs a logical AND of the two operands updating the flags
  2684. register without saving the result.
  2685.  
  2686. Clocks Size
  2687. Operands 808x 286 386 486 Bytes
  2688.  
  2689. reg,reg 3 2 1 1 2
  2690. reg,mem 9+EA 6 5 1 2-4 (W88=13+EA)
  2691. mem,reg 9+EA 6 5 2 2-4 (W88=13+EA)
  2692. reg,immed 5 3 2 1 3-4
  2693. mem,immed 11+EA 6 5 2 3-6
  2694. accum,immed 4 3 2 1 2-3
  2695.  
  2696.  
  2697. VERR - Verify Read (286+ protected)
  2698.  
  2699. Usage: VERR src
  2700. Modifies flags: ZF
  2701.  
  2702. Verifies the specified segment selector is valid and is readable
  2703. at the current privilege level. If the segment is readable,
  2704. the Zero Flag is set, otherwise it is cleared.
  2705.  
  2706. Clocks Size
  2707. Operands 808x 286 386 486 Bytes
  2708.  
  2709. reg16 - 14 10 11 3
  2710. mem16 - 16 11 11 5
  2711.  
  2712.  
  2713. VERW - Verify Write (286+ protected)
  2714.  
  2715. Usage: VERW src
  2716. Modifies flags: ZF
  2717.  
  2718. Verifies the specified segment selector is valid and is ratable
  2719. at the current privilege level. If the segment is writable,
  2720. the Zero Flag is set, otherwise it is cleared.
  2721.  
  2722. Clocks Size
  2723. Operands 808x 286 386 486 Bytes
  2724.  
  2725. reg16 - 14 15 11 3
  2726. mem16 - 16 16 11 5
  2727. WAIT/FWAIT - Event Wait
  2728.  
  2729. Usage: WAIT
  2730. FWAIT
  2731. Modifies flags: None
  2732.  
  2733. CPU enters wait state until the coprocessor signals it has finished
  2734. its operation. This instruction is used to prevent the CPU from
  2735. accessing memory that may be temporarily in use by the coprocessor.
  2736. WAIT and FWAIT are identical.
  2737.  
  2738. Clocks Size
  2739. Operands 808x 286 386 486 Bytes
  2740.  
  2741. none 4 3 6+ 1-3 1
  2742.  
  2743.  
  2744. WBINVD - Write-Back and Invalidate Cache (486+)
  2745.  
  2746. Usage: WBINVD
  2747. Modifies flags: None
  2748.  
  2749. Flushes internal cache, then signals the external cache to write
  2750. back current data followed by a signal to flush the external cache.
  2751.  
  2752. Clocks Size
  2753. Operands 808x 286 386 486 Bytes
  2754.  
  2755. none - - - 5 2
  2756.  
  2757.  
  2758. XCHG - Exchange
  2759.  
  2760. Usage: XCHG dest,src
  2761. Modifies flags: None
  2762.  
  2763. Exchanges contents of source and destination.
  2764.  
  2765. Clocks Size
  2766. Operands 808x 286 386 486 Bytes
  2767.  
  2768. reg,reg 4 3 3 3 2
  2769. mem,reg 17+EA 5 5 5 2-4 (W88=25+EA)
  2770. reg,mem 17+EA 5 5 3 2-4 (W88=25+EA)
  2771. accum,reg 3 3 3 3 1
  2772. reg,accum 3 3 3 3 1
  2773.  
  2774.  
  2775. XLAT/XLATB - Translate
  2776.  
  2777. Usage: XLAT translation-table
  2778. XLATB (masm 5.x)
  2779. Modifies flags: None
  2780.  
  2781. Replaces the byte in AL with byte from a user table addressed by
  2782. BX. The original value of AL is the index into the translate table.
  2783. The best way to discripe this is MOV AL,[BX+AL]
  2784.  
  2785. Clocks Size
  2786. Operands 808x 286 386 486 Bytes
  2787.  
  2788. table offset 11 5 5 4 1
  2789. XOR - Exclusive OR
  2790.  
  2791. Usage: XOR dest,src
  2792. Modifies flags: CF OF PF SF ZF (AF undefined)
  2793.  
  2794. Performs a bitwise exclusive OR of the operands and returns
  2795. the result in the destination.
  2796.  
  2797. Clocks Size
  2798. Operands 808x 286 386 486 Bytes
  2799.  
  2800. reg,reg 3 2 2 1 2
  2801. mem,reg 16+EA 7 6 3 2-4 (W88=24+EA)
  2802. reg,mem 9+EA 7 7 2 2-4 (W88=13+EA)
  2803. reg,immed 4 3 2 1 3-4
  2804. mem,immed 17+EA 7 7 3 3-6 (W88=25+EA)
  2805. accum,immed 4 3 2 1 2-3
  2806. 
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement