Hi all,

there's no sub forum for Assembler questions here ..

.. which means, only a very few people

are working on assembler code in FPC / LCL ?

I need some mathematical functions such as logN:

( Log.N(X) := Log.2(X) / Log.2(N) )

From which sources can I learn how to write

working FPC / LCL assembler code to make my functions work ?

Thanks,

Peter

The following code works in Delphi 5, but not in Lazarus (1.6).

-----------------------------------------------------

function LogN( Base, X: Extended): Extended;

{$ifdef FPC} begin {$ASMMODE intel} {$endif}

asm

FLD1

FLD X

FYL2X

FLD1

FLD Base

FYL2X

FDIV // Lazarus Warning: fdivrp without operand translated into fdivrpP

FWAIT

end;

{$ifdef FPC} end; {$endif}