Thema: Delphi Inline Asm Problem

Einzelnen Beitrag anzeigen

JnZn558

Registriert seit: 22. Aug 2004
98 Beiträge
 
#17

Re: Inline Asm Problem

  Alt 8. Mär 2010, 21:35
ich hab nun endlich geschafft

Delphi-Quellcode:
program Project;

{$apptype console}

uses SysUtils, Dialogs;

function ShowText: PChar;
begin
  asm
      jmp @start
      @str: dw 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 0
      @start:
      lea eax, @str
      mov Result, eax;
  end;
end;

begin
  try
    Writeln('Text: ' + ShowText);
    Readln;
  except
    on E:Exception do
    Writeln(E.Classname, ': ', E.Message);
  end;
end.
Peace on the world
  Mit Zitat antworten Zitat