Files
2024-02-19 00:25:23 -05:00

123 lines
13 KiB
HTML

<html><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>80386 Programmer's Reference Manual -- Chapter 17</title>
</head>
<body>
<b>up:</b> <a href="TOC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/TOC.HTM">Table of Contents</a><br>
<b>prev:</b> <a href="S16_04.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S16_04.HTM">16.4 Transferring Control Among Mixed Code Segments&gt;</a><br>
<b>next:</b> <a href="S17_01.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S17_01.HTM">17.1 Operand-Size and Address-Size Attributes</a>
<p>
<hr>
<p>
<h1>Chapter 17 80386 Instruction Set</h1>
<p>This chapter presents instructions for the 80386 in alphabetical order. For each instruction, the forms are given for each operand combination, including object code produced, operands required, execution time, and a description. For each instruction, there is an operational description and a summary of exceptions generated.
<p><a href="S17_01.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S17_01.HTM">17.1 Operand-Size and Address-Size Attributes</a><br>
<a href="S17_02.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S17_02.HTM">17.2 Instruction Format</a>
<h2>Instruction Set</h2>
<a href="AAA.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/AAA.HTM">AAA ASCII Adjust after Addition</a><br>
<a href="AAD.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/AAD.HTM">AAD ASCII Adjust AX before Division</a><br>
<a href="AAM.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/AAM.HTM">AAM ASCII Adjust AX after Multiply</a><br>
<a href="AAS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/AAS.HTM">AAS ASCII Adjust AL after Subtraction</a><br>
<a href="ADC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/ADC.HTM">ADC Add with Carry</a><br>
<a href="ADD.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/ADD.HTM">ADD Add</a><br>
<a href="AND.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/AND.HTM">AND Logical AND</a><br>
<a href="ARPL.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/ARPL.HTM">ARPL Adjust RPL Field of Selector</a><br>
<a href="BOUND.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/BOUND.HTM">BOUND Check Array Index Against Bounds</a><br>
<a href="BSF.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/BSF.HTM">BSF Bit Scan Forward</a><br>
<a href="BSR.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/BSR.HTM">BSR Bit Scan Reverse</a><br>
<a href="BT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/BT.HTM">BT Bit Test</a><br>
<a href="BTC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/BTC.HTM">BTC Bit Test and Complement</a><br>
<a href="BTR.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/BTR.HTM">BTR Bit Test and Reset</a><br>
<a href="BTS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/BTS.HTM">BTS Bit Test and Set</a><br>
<a href="CALL.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CALL.HTM">CALL Call Procedure</a><br>
<a href="CBW.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CBW.HTM">CBW/CWDE Convert Byte to Word/Convert Word to Doubleword</a><br>
<a href="CLC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CLC.HTM">CLC Clear Carry Flag</a><br>
<a href="CLD.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CLD.HTM">CLD Clear Direction Flag</a><br>
<a href="CLI.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CLI.HTM">CLI Clear Interrupt Flag</a><br>
<a href="CLTS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CLTS.HTM">CLTS Clear Task-Switched Flag in CR0</a><br>
<a href="CMC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CMC.HTM">CMC Complement Carry Flag</a><br>
<a href="CMP.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CMP.HTM">CMP Compare Two Operands</a><br>
<a href="CMPS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CMPS.HTM">CMPS/CMPSB/CMPSW/CMPSD Compare String Operands</a><br>
<a href="CWD.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/CWD.HTM">CWD/CDQ Convert Word to Doubleword/Convert Doubleword to Quadword</a><br>
<a href="DAA.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/DAA.HTM">DAA Decimal Adjust AL after Addition</a><br>
<a href="DAS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/DAS.HTM">DAS Decimal Adjust AL after Subtraction</a><br>
<a href="DEC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/DEC.HTM">DEC Decrement by 1</a><br>
<a href="DIV.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/DIV.HTM">DIV Unsigned Divide</a><br>
<a href="ENTER.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/ENTER.HTM">ENTER Make Stack Frame for Procedure Parameters</a><br>
<a href="HLT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/HLT.HTM">HLT Halt</a><br>
<a href="IDIV.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/IDIV.HTM">IDIV Signed Divide</a><br>
<a href="IMUL.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/IMUL.HTM">IMUL Signed Multiply</a><br>
<a href="IN.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/IN.HTM">IN Input from Port</a><br>
<a href="INC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/INC.HTM">INC Increment by 1</a><br>
<a href="INS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/INS.HTM">INS/INSB/INSW/INSD Input from Port to String</a><br>
<a href="INT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/INT.HTM">INT/INTO Call to Interrupt Procedure</a><br>
<a href="IRET.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/IRET.HTM">IRET/IRETD Interrupt Return</a><br>
<a href="JCC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/JCC.HTM">Jcc Jump if Condition is Met</a><br>
<a href="JMP.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/JMP.HTM">JMP Jump</a><br>
<a href="LAHF.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LAHF.HTM">LAHF Load Flags into AH Register</a><br>
<a href="LAR.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LAR.HTM">LAR Load Access Rights Byte</a><br>
<a href="LEA.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LEA.HTM">LEA Load Effective Address</a><br>
<a href="LEAVE.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LEAVE.HTM">LEAVE High Level Procedure Exit</a><br>
<a href="LGDT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LGDT.HTM">LGDT/LIDT Load Global/Interrupt Descriptor Table Register</a><br>
<a href="LGS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LGS.HTM">LGS/LSS/LDS/LES/LFS Load Full Pointer</a><br>
<a href="LLDT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LLDT.HTM">LLDT Load Local Descriptor Table Register</a><br>
<a href="LMSW.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LMSW.HTM">LMSW Load Machine Status Word</a><br>
<a href="LOCK.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LOCK.HTM">LOCK Assert LOCK# Signal Prefix</a><br>
<a href="LODS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LODS.HTM">LODS/LODSB/LODSW/LODSD Load String Operand</a><br>
<a href="LOOP.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LOOP.HTM">LOOP/LOOPcond Loop Control with CX Counter</a><br>
<a href="LSL.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LSL.HTM">LSL Load Segment Limit</a><br>
<a href="LTR.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LTR.HTM">LTR Load Task Register</a><br>
<a href="MOV.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/MOV.HTM">MOV Move Data</a><br>
<a href="MOVRS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/MOVRS.HTM">MOV Move to/from Special Registers</a><br>
<a href="MOVS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/MOVS.HTM">MOVS/MOVSB/MOVSW/MOVSD Move Data from String to String</a><br>
<a href="MOVSX.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/MOVSX.HTM">MOVSX Move with Sign-Extend</a><br>
<a href="MOVZX.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/MOVZX.HTM">MOVZX Move with Zero-Extend</a><br>
<a href="MUL.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/MUL.HTM">MUL Unsigned Multiplication of AL or AX</a><br>
<a href="NEG.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/NEG.HTM">NEG Two's Complement Negation</a><br>
<a href="NOP.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/NOP.HTM">NOP No Operation</a><br>
<a href="NOT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/NOT.HTM">NOT One's Complement Negation</a><br>
<a href="OR.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/OR.HTM">OR Logical Inclusive OR</a><br>
<a href="OUT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/OUT.HTM">OUT Output to Port</a><br>
<a href="OUTS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/OUTS.HTM">OUTS/OUTSB/OUTSW/OUTSD Output String to Port</a><br>
<a href="POP.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/POP.HTM">POP Pop a Word from the Stack</a><br>
<a href="POPA.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/POPA.HTM">POPA/POPAD Pop all General Registers</a><br>
<a href="POPF.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/POPF.HTM">POPF/POPFD Pop Stack into FLAGS or EFLAGS Register</a><br>
<a href="PUSH.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/PUSH.HTM">PUSH Push Operand onto the Stack</a><br>
<a href="PUSHA.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/PUSHA.HTM">PUSHA/PUSHAD Push all General Registers</a><br>
<a href="PUSHF.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/PUSHF.HTM">PUSHF/PUSHFD Push Flags Register onto the Stack</a><br>
<a href="RCL.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/RCL.HTM">RCL/RCR/ROL/ROR Rotate</a><br>
<a href="REP.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/REP.HTM">REP/REPE/REPZ/REPNE/REPNZ Repeat Following String Operation</a><br>
<a href="RET.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/RET.HTM">RET Return from Procedure</a><br>
<a href="SAHF.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SAHF.HTM">SAHF Store AH into Flags</a><br>
<a href="SAL.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SAL.HTM">SAL/SAR/SHL/SHR Shift Instructions</a><br>
<a href="SBB.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SBB.HTM">SBB Integer Subtraction with Borrow</a><br>
<a href="SCAS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SCAS.HTM">SCAS/SCASB/SCASW/SCASD Compare String Data</a><br>
<a href="SETCC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SETCC.HTM">SETcc Byte Set on Condition</a><br>
<a href="SGDT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SGDT.HTM">SGDT/SIDT Store Global/Interrupt Descriptor Table Register</a><br>
<a href="SHLD.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SHLD.HTM">SHLD Double Precision Shift Left</a><br>
<a href="SHRD.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SHRD.HTM">SHRD Double Precision Shift Right</a><br>
<a href="SLDT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SLDT.HTM">SLDT Store Local Descriptor Table Register</a><br>
<a href="SMSW.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SMSW.HTM">SMSW Store Machine Status Word</a><br>
<a href="STC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/STC.HTM">STC Set Carry Flag</a><br>
<a href="STD.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/STD.HTM">STD Set Direction Flag</a><br>
<a href="STI.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/STI.HTM">STI Set Interrupt Flag</a><br>
<a href="STOS.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/STOS.HTM">STOS/STOSB/STOSW/STOSD Store String Data</a><br>
<a href="STR.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/STR.HTM">STR Store Task Register</a><br>
<a href="SUB.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/SUB.HTM">SUB Integer Subtraction</a><br>
<a href="TEST.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/TEST.HTM">TEST Logical Compare</a><br>
<a href="VERR.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/VERR.HTM">VERR, VERW Verify a Segment for Reading or Writing</a><br>
<a href="WAIT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/WAIT.HTM">WAIT Wait until BUSY# Pin is Inactive (HIGH)</a><br>
<a href="XCHG.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/XCHG.HTM">XCHG Exchange Register/Memory with Register</a><br>
<a href="XLAT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/XLAT.HTM">XLAT/XLATB Table Look-up Translation</a><br>
<a href="XOR.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/XOR.HTM">XOR Logical Exclusive OR</a>
<p>
<hr>
<p><b>up:</b> <a href="TOC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/TOC.HTM">Table of Contents</a><br>
<b>prev:</b> <a href="S16_04.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S16_04.HTM">16.4 Transferring Control Among Mixed Code Segments&gt;</a><br>
<b>next:</b> <a href="S17_01.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S17_01.HTM">17.1 Operand-Size and Address-Size Attributes</a>
</body>