recreate project as DLL
This commit is contained in:
54
test_cases/simple_tests.asm
Normal file
54
test_cases/simple_tests.asm
Normal file
@@ -0,0 +1,54 @@
|
||||
format ms64 coff
|
||||
|
||||
section '.text' code readable writeable executable
|
||||
|
||||
use64
|
||||
|
||||
public _small
|
||||
_small:
|
||||
xor eax, eax
|
||||
ret
|
||||
|
||||
public _rip_relative
|
||||
_rip_relative:
|
||||
mov eax, [seed]
|
||||
mov ecx, 214013
|
||||
mul ecx
|
||||
add eax, 2531011
|
||||
mov [seed], eax
|
||||
|
||||
shr eax, 16
|
||||
and eax, 0x7FFF
|
||||
ret
|
||||
|
||||
seed dd 1
|
||||
|
||||
public _branch
|
||||
_branch:
|
||||
and rax, 1
|
||||
jz @branch_ret
|
||||
xor rax, rax
|
||||
|
||||
nop ; Just some padding, so the function can't be copied entirely into the
|
||||
nop ; trampoline
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
@branch_ret:
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user