Forum > General

ASM bug or error ?

(1/1)

sxb:
Hello all
I cant seem to get ASM working in OS-X. Is there a difference in syntax compared to regular Delphi or is something else happening here ?
 
I get an error message : "unit1.pas(33,3) Fatal: Selected assembler reader not supported"
-----------------
function getanum(x: Integer): Integer;
begin
  asm
    add eax, eax
  end;
end;

Thanks for any pointers on this

Regards
soumi

Marc:
I think only AT&T style asm is supported. Further I would use plain pascal and skip asm. I cannot guarantee that the same registers are used on windows and osx 

Silvio Clécio:
Please, try:

// {$mode objfpc}{$H+} Remove

{$mode delphi} // Add

function getanum(x: Integer): Integer;
begin
  asm
    add eax, eax
  end;
end;

I have not tested. :-[

sxb:
Thanks Marc and Silvio

BTW, the {$mode delphi} worked .... :)

Regards
Soumi

Navigation

[0] Message Index

Go to full version