Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
TEST Instruction
 Detail Key Example                    Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Title:    Logical Compare                       Flags: O D I T S Z A P C
                                                         ═════════════════
  Syntax:   TEST dest,src                                0       ± ± ? ± 0
 
  See also: CMP, AND, Jcond
 
  Description:
 
     Tests specified bits of an operand and sets the flags for a
     subsequent conditional jump or set instruction. One of the
     operands contains the value to be tested. The other contains a bit
     mask indicating the bits to be tested.
 
     TEST works by doing a bitwise AND operation on the source and
     destination operands. The flags are modified according to the
     result, but the destination operand is not changed.
 
     This instruction is the same as the AND instruction, except that
     the result is not stored.
                                    -♦-