TEST (x86 instruction)

TEST (x86 instruction)

In the x86 assembly language, the TEST instruction performs a bitwise AND on two operands. The flags SF, ZF, PF, CF, OF and AF are modified while the result of the AND is discarded. There are 9 different opcodes for the TEST instruction depending on the type and size of the operands. It can compare 8bit, 16bit or 32bit values. It can also compare registers, immediate values and register indirect values. [cite web |url=http://download.intel.com/design/PentiumII/manuals/24319102.PDF|format = PDF| title=Intel Architecture Software Developer's Manual, Volume 2: Instruction Set Reference Manual|accessdate=2007-10-25]

TEST opcode variations

The TEST operation sets the flags CF and OF to zero. The SF is set to the MSB of the result of the AND. If the result of the AND is 0, the ZF is set to 1, otherwise set to 0. The parity flag is set to the bitwise XNOR of the result of the AND. The value of AF is undefined.

References


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Test — Test, TEST or Tester may refer to:In science:* Experiment, part of the scientific method * Test (biology), the shell of sea urchins and certain microorganisms * Test method, a definitive procedure that produces a test result * Chemical test, a… …   Wikipedia

  • MOV (x86 instruction) — In the x86 assembly language, the MOV instruction is a mnemonic for the copying of data from one location to another. The x86 assembly language actually contains a number of different opcodes that perform a move. Depending on whether the… …   Wikipedia

  • X86 assembly language — is the assembly language for the x86 class of processors, which includes Intel s Pentium series and AMD s Athlon series. Like all assembly languages, it uses short mnemonics to represent the fundamental operations that the CPU in a computer can… …   Wikipedia

  • x86 — This article is about Intel microprocessor architecture in general. For the 32 bit generation of this architecture which is also called x86 , see IA 32. x86 Designer Intel, AMD Bits 16 bit, 32 bit, and/or 64 bit Introduced 1978 Design …   Wikipedia

  • X86 architecture — The generic term x86 refers to the most commercially successful instruction set architecture [Unlike the microarchitecture (and the specific electronic and physical implementation) used for a specific chip design] in the history of personal… …   Wikipedia

  • Instruction set — An instruction set, or instruction set architecture (ISA), is the part of the computer architecture related to programming, including the native data types, instructions, registers, addressing modes, memory architecture, interrupt and exception… …   Wikipedia

  • Jeu d'instruction x86 — Article détaillé : Jeu d instructions. Le jeu d instructions du x86 a subi de nombreux changements au cours du temps. La plupart d entre eux ne sont que des ajouts au jeu d instruction initial afin d apporter de nouvelles fonctionnalités.… …   Wikipédia en Français

  • Test register — was a register used by the processor, usually to do a self test. Most of these registers were undocumented, and used by specialized software. In the x86 series, these registers were marked TR4 to TR7. Usually, regular programs don t require these …   Wikipedia

  • x86 debug register — On the x86 architecture, a debug register is a register used by a processor for program debugging. There are six debug registers, named DR0...DR7, with DR4 and DR5 as obsolete synonyms for DR6 and DR7. The debug registers allow programmers to… …   Wikipedia

  • X86 debug register — Debug register is a register used by a processor for program debugging. On the x86 architecture, these are named DR0...DR7. The debug registers allow programmers to selectively enable various debug conditions associated with the four debug… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”