Function add(x,y:Integer):Integer;
varcount:Integer;begin asm mov eax,x mov ecx,y add eax,ecx mov count,eax end; Result:=count;end;procedure TForm1.Button1Click(Sender: TObject);
vari:integer;beginshowmessage ('hello,学习delphi与asm'); asm xor eax,eax mov eax,12345678H xor eax,eax mov ax,5678H xor eax,eax mov ah,56H //高位 xor eax,eax mov al,78H //低位 or ecx,-1 or edi,-1 //大家破解一些软件可以用到,前提是用到showmessage.end;i:=add(2,8);showmessage(IntToStr(i));end;procedure TForm1.Button2Click(Sender: TObject);
beginclose;end;procedure proc(x,y,z:integer);
var a,b,c:integer; str:string;begin asm mov eax,x mov a,eax mov b,ecx mov c,edx end; str:=Format('%d,%d,%d',[a,b,c]); ShowMessage(str);end;procedure TForm1.Button1Click(Sender: TObject);
beginproc(11,22,33);end;