Files
oldlinux-files/Ref-docs/manual Intel386/I386Manual/INC.HTM
2024-02-19 00:21:47 -05:00

52 lines
2.4 KiB
HTML

<html><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>80386 Programmer's Reference Manual -- Opcode INC</title>
</head>
<body>
<b>up:</b> <a href="C17.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C17.HTM">Chapter 17 -- 80386 Instruction Set</a><br>
<b>prev:</b><a href="IN.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/IN.HTM"> IN Input from Port</a><br>
<b>next:</b><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>
<p>
<hr>
<p>
<h1>INC -- Increment by 1</h1>
<pre>
Opcode Instruction Clocks Description
FE /0 INC r/m8 Increment r/m byte by 1
FF /0 INC r/m16 Increment r/m word by 1
FF /6 INC r/m32 Increment r/m dword by 1
40 + rw INC r16 Increment word register by 1
40 + rd INC r32 Increment dword register by 1
</pre>
<h2>Operation</h2>
<pre>
DEST := DEST + 1;
</pre>
<h2>Description</h2>
INC adds 1 to the operand. It does not change the carry flag. To affect the carry flag, use the <a href="ADD.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/ADD.HTM">ADD</a> instruction with a second operand of 1.
<h2>Flags Affected</h2>
OF, SF, ZF, AF, and PF as described in <a href="APPC.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/APPC.HTM">Appendix C</a>
<h2>Protected Mode Exceptions</h2>
#GP(0) if the operand is in a nonwritable segment; #GP(0) for an illegal memory operand effective address in the CS, DS, ES, FS, or GS segments; #SS(0) for an illegal address in the SS segment; #PF(fault-code) for a page fault
<h2>Real Address Mode Exceptions</h2>
Interrupt 13 if any part of the operand would lie outside of the effective address space from 0 to 0FFFFH
<h2>Virtual 8086 Mode Exceptions</h2>
Same exceptions as in Real Address Mode; #PF(fault-code) for a page fault
<p>
<hr>
<p><b>up:</b> <a href="C17.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C17.HTM">Chapter 17 -- 80386 Instruction Set</a><br>
<b>prev:</b><a href="IN.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/IN.HTM"> IN Input from Port</a><br>
<b>next:</b><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>
</body>