Re:XOR'ing a register with itself is the idiom for zeroing i...
by not_a_bijection on Wednesday April 22, 2026 @10:22AM
(#47864090)
You can do better. X86 has both "op [mem], reg" and "op reg, [mem]" variants of most instructions, where "[mem]" can be a register too. So you have two ways to encode "xor eax, eax", differing by which of the operands is in the "possible memory operand" slot, the source or the destination.
[ Parent
| on HN ]
Re:XOR'ing a register with itself is the idiom for zeroing i...
by mpeg on Wednesday April 22, 2026 @11:36AM
(#47865120)
This one would be a fun challenge in a ctf, or maybe more appropriate for a puzzle hunt – most people would look at the dissassembly and not at the actual bytes and completely miss the binary encoding
Re:XOR'ing a register with itself is the idiom for zeroing i...
by zzo38computer on Wednesday April 22, 2026 @03:00PM
(#47867799)
Some disassembly listings will also include the actual bytes (there are multiple reasons why you will want this).