I have a problem. I have following x86 delphi code which is written in ASM. I need to port this to AMD64?
type
TCPUID = array[1..4] of Longint;
function GetCID : TCPUID; assembler; register;
asm
push ebx
push edi
mov edi, eax
mov eax, 1
dw $A20F
stosd
mov eax, ebx
stosd
mov eax, ecx
stosd
mov eax, edx
stosd
pop edi
pop ebx
end;
I have never programmed in assembly, does anyone know what the port would be or how I would go about changing it.
I am not Win64 assembler guru, but the next translation worked for me (tested on 64-bit free pascal):