Reading/writing serial port - code won't work

I have a 16 bit dll for reading\writing ports that uses the code Result
:= Port[PortAddr]
and Port[PortAddr] := DataByte. I  now need to update the dll to 32 bit.

I understand that Port[] wont work, and I need to use Assembler. This
should work in win95, but not in NT. Will it work for Win98 ?

Can anyone send me an example of code or component that will do this.