Skip to content

Instantly share code, notes, and snippets.

@enedil
Created November 28, 2020 19:49
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 enedil/596154c276497d24169e57bd209355a8 to your computer and use it in GitHub Desktop.
Save enedil/596154c276497d24169e57bd209355a8 to your computer and use it in GitHub Desktop.
[BITS 64]
%macro check_bit 1
mov rcx, 1
shl rcx, %1
test rcx, rsi
jz %%skip
or rsi, rcx
shl rcx, %1
mov rcx, 1
%%skip:
%endmacro
xor esi, esi
mov rdi, [0x2170000]
mov [0x2170000], rsi
mov rsi, rdi
mov rdi, rsi
%assign i 0
%rep 64
check_bit i
%assign i i+1
%endrep
mov rdi, 0
mov rax, 60
syscall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment