Difference between revisions of "Assembler:Commands:TEST"

From Cheat Engine
Jump to navigation Jump to search
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
Computes the bit-wise logical AND of first operand (source 1 operand) and the second operand (source 2 operand) and sets the SF, ZF, and PF status flags according to the result. The result is then discarded.
 
Computes the bit-wise logical AND of first operand (source 1 operand) and the second operand (source 2 operand) and sets the SF, ZF, and PF status flags according to the result. The result is then discarded.
  
[http://x86.renejeschke.de/html/file_module_x86_id_315.html x86.renejeschke.de/html/file_module_x86_id_315.html]
+
[http://c9x.me/x86/html/file_module_x86_id_315.html c9x.me/x86/html/file_module_x86_id_315.html]
 
</div>
 
</div>
  
Line 56: Line 56:
 
  test [SomeSymbol],rax
 
  test [SomeSymbol],rax
  
== See also ==
+
{{AssemblerCommandSeeAlso}}
* [[Assembler]]
 
* [[Cheat_Engine:Auto Assembler|Auto Assembler]]
 
* [[Assembler:Commands|Assembler Commands]]
 
  
== External links ==
+
{{Template:AssemblerCommandExternalLinks}}
* [https://wikipedia.org/wiki/X86_instruction_listings wikipedia.org/wiki/X86_instruction_listings]
 
* [https://wikibooks.org/wiki/X86_Assembly/Other_Instructions wikibooks.org/wiki/X86_Assembly/Other_Instructions]
 
* [http://x86.renejeschke.de/ x86.renejeschke.de]
 
* [http://www.asmpedia.org/index.php?title=Main_Page asmpedia.org]
 
* [http://ref.x86asm.net/ ref.x86asm.net]
 

Revision as of 16:06, 3 January 2018

command test destination, source

The TEST instruction works same as the AND operation, but unlike AND instruction, it does not change the first operand.

The OF and CF flags are set to 0. The SF, ZF, and PF flags are set according to the result (see the "Operation" section above). The state of the AF flag is undefined.


Computes the bit-wise logical AND of first operand (source 1 operand) and the second operand (source 2 operand) and sets the SF, ZF, and PF status flags according to the result. The result is then discarded.

c9x.me/x86/html/file_module_x86_id_315.html


Command Parameters

Parameter Description
destination The destination operand
source The source operand


Examples

test al,1
test ax,1
test ax,1
test eax,1
test rax,1
test al,al
test ax,ax
test ax,ax
test eax,eax
test rax,rax
test [eax],eax
test [rax],rax
test [00123ABC],eax
test [SomeSymbol],rax

See also

External links