1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112:
| unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; Button1: TButton; Button2: TButton; Label5: TLabel; Label6: TLabel; Label3: TLabel; Label4: TLabel; procedure ende(Sender: TObject); procedure start(Sender: TObject); private public end;
var Form1: TForm1;
implementation
{$R *.dfm}
procedure zeit1; var Hour,Min,Sec,MSec:word; begin DecodeTime(Time,Hour,Min,Sec,MSec); form1.label1.caption:='Start: Sec: '+inttostr(sec)+ ' MSec: '+inttostr(msec); end;
procedure zeit2; var Hour,Min,Sec,MSec:word; begin DecodeTime(Time,Hour,Min,Sec,MSec); form1.label2.caption:='Ende: Sec: '+inttostr(sec)+ ' MSec: '+inttostr(msec); end;
procedure zeit3; var Hour,Min,Sec,MSec:word; begin DecodeTime(Time,Hour,Min,Sec,MSec); form1.label5.caption:='Start: Sec: '+inttostr(sec)+ ' MSec: '+inttostr(msec); end;
procedure zeit4; var Hour,Min,Sec,MSec:word; begin DecodeTime(Time,Hour,Min,Sec,MSec); form1.label6.caption:='Ende: Sec: '+inttostr(sec)+ ' MSec: '+inttostr(msec); end;
procedure TForm1.ende(Sender: TObject); begin close end;
procedure TForm1.start(Sender: TObject); var i:longint; x1,x3:extended; x2:real; s:string;
procedure mal_compiler; begin x3:=x1*x2; end;
procedure mal_assembler; asm fld x1 fmul x2 fstp x3 end;
begin x1:=2.3; x2:=3.4; x3:=0.0; zeit1; for i:=0 to 1000000000 do mal_compiler; zeit2; str(x3:5:5,s); form1.Label3.Caption:=s; zeit3; for i:=0 to 1000000000 do mal_assembler; zeit4; str(x3:5:5,s); form1.Label4.Caption:=s; end;
end. |