unit dtest03Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, IO, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; IO1: TIO; Label1: TLabel; Button3: TButton; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; Label7: TLabel; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private-Deklarationen } public { Public-Deklarationen } end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.Button1Click(Sender: TObject); var Data: Byte; begin Data:=00; Io1.Port[$378]:=Data; end; procedure TForm1.Button2Click(Sender: TObject); var Data: Byte; begin Data:=$FF; Io1.Port[$378]:=Data; end; procedure TForm1.Button3Click(Sender: TObject); var Data: Byte; s: string; begin Data:=Io1.Port[$379] and $F8; str (Data, s); Label2.Caption:=s; if ((Data and $08) = 1) then Label3.Caption:='ERROR = high' else Label3.Caption:='.'; if ((Data and $10)=$10) then Label4.Caption:='SLCT = high' else Label4.Caption:='.'; if ((Data and $20)=$20) then Label5.Caption:='PE = high' else Label5.Caption:='.'; if ((Data and $40)=$40) then Label6.Caption:='ACK = high' else Label6.Caption:='.'; if ((Data and $80)=$80) then Label7.Caption:='BUSY = high' else Label7.Caption:='.'; end; procedure TForm1.FormCreate(Sender: TObject); begin Label3.Caption:='ERROR'; Label4.Caption:='SLCT'; Label5.Caption:='PE'; Label6.Caption:='ACK'; Label7.Caption:='BUSY'; end; end.