Hi all, I wanted to learn more about assembly and decided to start with simple assembly inserts for Free Pascal. But I ran into a problem. I tried operations with integer digits, no problems with them.
But when trying to do something with floating-point numbers, I keep getting an error: Error: Asm: [fld reg???] invalid combination of opcode and operands
function Division(A, B: Single): Single; assembler;
asm
Fld A
Fdiv B
Fst @Result
end;
At the same time, the same code works in Delphi CE and gives a correct answer:
j := Division( 10, 2);
>> 5.00000000000000E+0000
Why can't I use Fld in inline assembly? Or am I doing it wrong?