Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

test instruction

An instruction that ANDs two values only to set the flags, often used to ask "is this zero?" or "is this bit set?".

test a, b (x86-64) and tst xa, xb (ARM64, ands xzr, xa, xb) compute a & b, set ZF/SF (Z/N) from it, clear CF and OF (C and V), and write no register; test eax, eax checks for zero.

Examples

  • test eax, eax then je jumps when eax is 0, without changing eax.

Read the full section →