Skip to content
systemcoding.dev

Snippets

Short posts that solve one thing: the code, the output we got, and why it works.

Assembly

Zero a register with xor eax, eax

Zero a register with xor eax, eax: two bytes instead of five, and the 32-bit write clears the upper half of rax too. NASM 2.16, x86-64.

1 min read

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.