* remove "\r" nonsense
[mascara-docs.git] / i386 / i386.reference / appc.htm
blob5cf8448d2c8cdcb5b75c19b209409404fad51167
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <HTML>
3 <HEAD>
4 <TITLE>80386 Programmer's Reference Manual -- Appendix C</TITLE>
5 </HEAD>
6 <BODY>
7 <B>up:</B> <A HREF="app.htm">
8 Appendices</A><BR>
9 <B>prev:</B>
10 <A HREF="appb.htm">Appendix B -- Complete Flag Cross-Reference</A><BR>
11 <B>next:</B>
12 <A HREF="appd.htm">Appendix D -- Condition Codes</A>
13 <P>
14 <HR>
15 <P>
16 <H1>Appendix C -- Status Flag Summary</H1>
18 <H3>Status Flags' Functions</H3>
20 <PRE>
21 Bit Name Function
23 0 CF Carry Flag -- Set on high-order bit carry or borrow; cleared
24 otherwise.
25 2 PF Parity Flag -- Set if low-order eight bits of result contain
26 an even number of 1 bits; cleared otherwise.
27 4 AF Adjust flag -- Set on carry from or borrow to the low order
28 four bits of AL; cleared otherwise. Used for decimal
29 arithmetic.
30 6 ZF Zero Flag -- Set if result is zero; cleared otherwise.
31 7 SF Sign Flag -- Set equal to high-order bit of result (0 is
32 positive, 1 if negative).
33 11 OF Overflow Flag -- Set if result is too large a positive number
34 or too small a negative number (excluding sign-bit) to fit in
35 destination operand; cleared otherwise.
36 </PRE>
38 <H3>Key to Codes</H3>
40 <PRE>
41 T = instruction tests flag
42 M = instruction modifies flag
43 (either sets or resets depending on operands)
44 0 = instruction resets flag
45 -- = instruction's effect on flag is undefined
46 blank = instruction does not affect flag
47 </PRE>
49 <PRE>
50 Instruction OF SF ZF AF PF CF
51 AAA -- -- -- TM -- M
52 AAS -- -- -- TM -- M
53 AAD -- M M -- M --
54 AAM -- M M -- M --
55 DAA -- M M TM M TM
56 DAS -- M M TM M TM
57 ADC M M M M M TM
58 ADD M M M M M M
59 SBB M M M M M TM
60 SUB M M M M M M
61 CMP M M M M M M
62 CMPS M M M M M M
63 SCAS M M M M M M
64 NEG M M M M M M
65 DEC M M M M M
66 INC M M M M M
67 IMUL M -- -- -- -- M
68 MUL M -- -- -- -- M
69 RCL/RCR 1 M TM
70 RCL/RCR count -- TM
71 ROL/ROR 1 M M
72 ROL/ROR count -- M
73 SAL/SAR/SHL/SHR 1 M M M -- M M
74 SAL/SAR/SHL/SHR count -- M M -- M M
75 SHLD/SHRD -- M M -- M M
76 BSF/BSR -- -- M -- -- --
77 BT/BTS/BTR/BTC -- -- -- -- -- M
78 AND 0 M M -- M 0
79 OR 0 M M -- M 0
80 TEST 0 M M -- M 0
81 XOR 0 M M -- M 0
82 </PRE>
83 <P>
84 <HR>
85 <P>
86 <B>up:</B> <A HREF="app.htm">
87 Appendices</A><BR>
88 <B>prev:</B>
89 <A HREF="appb.htm">Appendix B -- Complete Flag Cross-Reference</A><BR>
90 <B>next:</B>
91 <A HREF="appd.htm">Appendix D -- Condition Codes</A>
92 </BODY>