To find out what an assembly instruction does, I recommend using Google. In Google you can just write the name of the instruction, in this case test
, and something like intel instruction
(for Intel instructions):
Google: test intel instruction
From the results of the Google search linked above you'll also find out that some servers have separate pages for different x86 assembly instructions named according to the name of the instruction:
http://web.itu.edu.tr/kesgin/mul06/intel/instr/test.html
As it says on the webpage linked above:
TEST - Test For Bit Pattern
Usage: TEST dest,src
Modifies flags: CF OF PF SF ZF (AF undefined)
Performs a logical AND of the two operands updating the flags
register without saving the result.
To find out what some other instruction does, for example cmpxchg
, all you need to do is to replace the name of the instruction in the address, so it would be:
http://web.itu.edu.tr/kesgin/mul06/intel/instr/cmpxchg.html
Finally, the ultimate source of information regarding Intel assembly are the Intel Software Developer Manuals, and they are very useful and freely available as pdf:
Intel® 64 and IA-32 Architectures Software Developer Manuals
Combined Volume Set of Intel® 64 and IA-32 Architectures Software Developer’s Manuals