我试了也是这样。对了,call ShowMessage,,,它的内容是从哪里来的。

解决方案 »

  1.   

    call ShowMessage
      是从Dialog.pas来。
    uses Windows,Messages....Dialogs;看到了吧?
      

  2.   

    可以显示呀!
    procedure TForm1.Button1Click(Sender: TObject);
    var s: string;
    begin
      s:='DelphiX';
       asm
        lea eax,[ebp-$04] // <-- Dest
        mov edx,s        // <--Source
        call system.@LStrLAsg  // <--Copy String
        mov eax,[ebp-$04] //堆栈里取出S
        call ShowMessage
       end;
    end;
      

  3.   

    大哥,我说的意思是,用
    asm
      lea eax,[ebp-$04] // <-- Dest
      mov edx,s        // <--Source
      call system.@LStrLAsg  // <--Copy String代替Pascal写的:
      s:= 'DelphiX';