Skip to content

Instantly share code, notes, and snippets.

@travisdowns
Created March 4, 2017 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save travisdowns/207f4c43e08d196e4280b2d89bd13336 to your computer and use it in GitHub Desktop.
Save travisdowns/207f4c43e08d196e4280b2d89bd13336 to your computer and use it in GitHub Desktop.
; compile this like:
; nasm -f elf64 decode-test.s
default rel
BITS 64
GLOBAL _start
_start:
; iteration count, doesn't really matter much for the purposes of this test
mov rsi, 1_000_000
xor eax, eax
ALIGN 32
; uncomment the nop below to misalign all the blocks by 1 byte
; nop
top:
; change the number below to affect the total size of the loop
%rep 2000
add r8, r8
add r9, r9
add r10, r10
add r11, r11
add r12, 1
%endrep
dec esi
jnz top
.end:
xor edi, edi
mov eax, 231 ; exit(0)
syscall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment