| |
1: unit main;
2: interface
3: uses
4: Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
5: Dialogs, StdCtrls;
6: type
7: TForm1 = class(TForm)
8: Button1: TButton;
9: Button2: TButton;
10: Edit1: TEdit;
11: Label1: TLabel;
12: Label2: TLabel;
13: procedure Button1Click(Sender: TObject);
14: procedure Button2Click(Sender: TObject);
15: private
16: { Private declarations }
17: public
18: { Public declarations }
19: end;
20:
21: var
22: Form1: TForm1;
23:
24: procedure Out32(wAddr:word;bOut:byte); stdcall; external 'inpout32.dll'
25: function Inp32(wAddr:word):integer; stdcall; external 'inpout32.dll'
26:
27: implementation
28:
29: {$R *.dfm}
30:
31: procedure TForm1.Button1Click(Sender: TObject);
32: begin
33: Out32($378,$53); // Out32
34: end;
35:
36: procedure TForm1.Button2Click(Sender: TObject);
37: begin
38: edit1.Text:=IntToHex(Inp32($378),2); // Edit1
39: end;
40: end.
|
|