64 bits have different names for pointer registers and the difference is transmitted. The first four parameters for the built-in assembler functions are passed through RCX, RDX, R8 and R9, respectively
EBX -> RBX EAX -> RAX EDX -> RDX
try it
procedure CopySwapPixel(const Source, Destination: Pointer); {$IFDEF CPUX64} asm mov al,[rcx+0] mov ah,[rcx+1] mov [rdx+2],al mov [rdx+1],ah mov al,[rcx+2] mov ah,[rcx+3] mov [rdx+0],al mov [rdx+3],ah end; {$ELSE} asm push ebx //[DCC Error]: E2116 Invalid combination of opcode and operands mov bl,[eax+0] mov bh,[eax+1] mov [edx+2],bl mov [edx+1],bh mov bl,[eax+2] mov bh,[eax+3] mov [edx+0],bl mov [edx+3],bh pop ebx //[DCC Error]: E2116 Invalid combination of opcode and operands end; {$ENDIF}
APZ28 source share