Assuming targeting X86_64 and using the systemV ABI then the parameters are passed in XMM0 and XMM1. You can then just do an SSE division and leave (result is in XMM0). If you really do want to use the FPU then you must copy the parameters to locals. And the rest is just like in the previous answer.On windows that might be different.
Aik_Tthe following works on Windows x86 and x64Code: Pascal [Select][+][-] program Project1; {$asmmode intel} {$MODE OBJFPC}{$H+} function Division( a, b:Single): Single; assembler; {$ifdef CPU64} var x, y: Single; {$endif} asm {$ifdef CPU32} fld dword ptr [a] Fdiv dword ptr [b] Fstp dword ptr [Result] {$else} movss x, xmm0 movss y, xmm1 fld dword ptr [x] fdiv dword ptr [y] Fstp dword ptr [Result] {$endif} end; var x, y:Single; begin x:=10; y:=5; writeln(Division(x, y)); writeln(Division(25, 5)); write('Press Return ');ReadLn; end.