Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 697 Bytes

README.md

File metadata and controls

41 lines (31 loc) · 697 Bytes

0x07

[dec] [home] [inc]

[See this riddle on the book]

inc      rax
neg      rax
inc      rax
neg      rax
See explanation

nop

This snippet, just like the previous, is equivalent to doing nothing.

the value of rax in incremented and negated (using two's complement), twice. In other words:

-(-(rax+1)+1)

which is equivalent to

-(-rax-1+1)

which is equivalent to

rax+1-1

which is equivalent to

rax

[dec] [home] [inc]