Registriert seit: 22. Aug 2004
98 Beiträge
|
Re: Inline Asm Problem
8. Mär 2010, 17:18
Delphi-Quellcode:
unit inlineasm;
interface
type
TAsm = class
m_strAsm: string;
function ShowText: AnsiString;
public
constructor Create;
property Text: AnsiString read ShowText;
end;
implementation
constructor TAsm.Create;
begin
end;
function TAsm.ShowText;
begin
asm
push edx
jmp @@skip
@str: db ' Hello World', $0
@@skip:
lea edx, @str
mov TAsm[eax].m_strAsm, edx
pop edx
end;
end;
end.
Delphi-Quellcode:
program Project;
uses SysUtils, Dialogs, inlineasm;
var
Test: TAsm;
begin
try
Writeln(' Text: ' + Test.Text); // hier soll der fehler sein, hier stopp debugger, und gibt mit I/O error 105
Readln;
except
on E: Exception do
Writeln(E.Classname, ' : ', E. Message);
end;
end.
Zitat:
Project Project.exe raised exception class EInOutError with message 'I/O error 105'.
Peace on the world
|
|
Zitat
|