unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) btn1: TButton; procedure getdeugbtn(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.getdeugbtn(Sender: TObject); begin try asm xor eax,eax mov dword ptr[eax],0 end except MessageBoxa(0,'错误到我这里来了','Sellcode',0); Exit; end; end; end.