Get the template on GitHub!

Deadbeef Decrementation

How to decrement from a magic debug value to zero.

Created on October 9, 2016.

;run on Linux with: nasm -felf64 decrement.asm && ld decrement.o && ./a.out

global _start

section .text

_start:
mov rax, 0xDEADBEEF
call decrement
call exit

decrement:
dec rax
cmp rax, 0
jg decrement
ret

exit:
mov rax, 60
syscall
``

Previous

Interior Crocodile Alligator, I Drive a Chevrolet Movie Theater

By using this site, you agree that you have read and understand its Privacy Policy.