Hi,

I'm converting a Delphi program to FPC/lazarus and I did hit a snag with an asm code part (win32, latest fpc and lazarus svn trunk is used). I know it is probably simple to fix, but I cannot seem to be able to figure it out:

function something(s :String; i: Integer):String;
var tmp:Array[0..32768]of byte;
begin
.
.
{$ASMMODE intel}
    asm
      pushad
      mov edi, offset tmp
      add edi, ebp
.
.
      popad
    end;
end;

The compiler gives "Error: Cannot use local variable or parameters here" at line "mov edi, offset tmp" .
How can I get the offset of a local variable into a register?

Thanks for any help.


_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to