Attempting to convert a small x86 snippet to x64

0

I have a snippet of x86 that I am trying to port to x64

Here is the x86 version

 push 0x00000000
 push 0x00000001
 push 0x00000000
 mov eax, 0x00000000
 call eax
 xor eax, eax
 ret

Here is my attempt at an x64 version

 sub rsp, 0x28
 mov rcx, 0x0000000000000000
 mov rdx, 0x1
 xor r8, r8
 mov rax, 0x0000000000000000
 call rax
 add rsp, 0x28
 ret

Am I doing this correct? If not, what do I need to fix in the x64 version?

assembly
x86
x86-64
asked on Stack Overflow Nov 28, 2018 by Anon9188

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0