Board index » delphi » I/O ports in Delphi 2.0

I/O ports in Delphi 2.0

In Delphi 1 (and Turbo Pascal) it was possible to read and write
to an i/o port using "i:=port[1234]" and "port[1234]:=12"

This is not possible in Delphi 2.0. Does anyone know a solution for this
problem?

Best regards,
Remco Jan Woldhuis

 

Re:I/O ports in Delphi 2.0


function InPort_Byte(Port : Word): byte; assembler;
begin
   asm
     mov  dx, Port;
     in   al, dx
     mov  result, al
   end;
end;

procedure OutPort_Byte(Port : Word; Val : byte); assembler;
begin
  asm
    mov dx, Port
    mov al, val
    out dx, al
  end;
end;

Quote
Remco Jan wrote:

> In Delphi 1 (and Turbo Pascal) it was possible to read and write
> to an i/o port using "i:=port[1234]" and "port[1234]:=12"

> This is not possible in Delphi 2.0. Does anyone know a solution for this
> problem?

> Best regards,
> Remco Jan Woldhuis

Other Threads