home *** CD-ROM | disk | FTP | other *** search
/ CD-X 1 / cdx_01.iso / demodisc / tyrant / docs / 386code / c_append.386 < prev    next >
Encoding:
Text File  |  1994-01-20  |  2.8 KB  |  68 lines

  1. Appendix C  Status Flag Summary
  2.  
  3. ────────────────────────────────────────────────────────────────────────────
  4.  
  5. Status Flags' Functions
  6.  
  7. Bit  Name   Function
  8.  
  9.  0   CF     Carry Flag ── Set on high-order bit carry or borrow; cleared
  10.             otherwise.
  11.  2   PF     Parity Flag ── Set if low-order eight bits of result contain
  12.             an even number of 1 bits; cleared otherwise.
  13.  4   AF     Adjust flag ── Set on carry from or borrow to the low order
  14.             four bits of   AL; cleared otherwise. Used for decimal
  15.             arithmetic.
  16.  6   ZF     Zero Flag ── Set if result is zero; cleared otherwise.
  17.  7   SF     Sign Flag ── Set equal to high-order bit of result (0 is
  18.             positive, 1 if negative).
  19. 11   OF     Overflow Flag ── Set if result is too large a positive number
  20.             or too small a negative number (excluding sign-bit) to fit in
  21.             destination operand; cleared otherwise.
  22.  
  23. Key to Codes
  24.  
  25. T     = instruction tests flag
  26. M     = instruction modifies flag
  27.         (either sets or resets depending on operands)
  28. 0     = instruction resets flag
  29. ──    = instruction's effect on flag is undefined
  30. blank = instruction does not affect flag
  31.  
  32.  
  33.  
  34. Instruction            OF   SF   ZF   AF   PF   CF
  35. AAA                    ──   ──   ──   TM   ──   M
  36. AAS                    ──   ──   ──   TM   ──   M
  37. AAD                    ──   M    M    ──   M    ──
  38. AAM                    ──   M    M    ──   M    ──
  39. DAA                    ──   M    M    TM   M    TM
  40. DAS                    ──   M    M    TM   M    TM
  41. ADC                    M    M    M    M    M    TM
  42. ADD                    M    M    M    M    M    M
  43. SBB                    M    M    M    M    M    TM
  44. SUB                    M    M    M    M    M    M
  45. CMP                    M    M    M    M    M    M
  46. CMPS                   M    M    M    M    M    M
  47. SCAS                   M    M    M    M    M    M
  48. NEG                    M    M    M    M    M    M
  49. DEC                    M    M    M    M    M
  50. INC                    M    M    M    M    M
  51. IMUL                   M    ──   ──   ──   ──   M
  52. MUL                    M    ──   ──   ──   ──   M
  53. RCL/RCR 1              M                        TM
  54. RCL/RCR count          ──                       TM
  55. ROL/ROR 1              M                        M
  56. ROL/ROR count          ──                       M
  57. SAL/SAR/SHL/SHR 1      M    M    M    ──   M    M
  58. SAL/SAR/SHL/SHR count  ──   M    M    ──   M    M
  59. SHLD/SHRD              ──   M    M    ──   M    M
  60. BSF/BSR                ──   ──   M    ──   ──   ──
  61. BT/BTS/BTR/BTC         ──   ──   ──   ──   ──   M
  62. AND                    0    M    M    ──   M    0
  63. OR                     0    M    M    ──   M    0
  64. TEST                   0    M    M    ──   M    0
  65. XOR                    0    M    M    ──   M    0
  66.  
  67.  
  68.