// Use the Turbo Pascal command ...
value:=port[$379]; { read from port }
// and
port[$379]:=value; { write to port }
// ---------
Var
BytesRead : BYTE;
begin
asm { Read port (LPT1) via Inline asm }
MOV dx,$379;
IN al,dx;
MOV BytesRead,al;
end;
BytesRead:=(BytesRead OR $07); { OR and then XOR the data }
BytesRead:=(BytesRead XOR $80); { to mask the unused bits }