yo utilizo la librería inpout32.dll, 2 instrucciones básicas, leer escribir, con 2 parametros que indican la seccion del puerto (&H379 o &H378) y el dato a envíar. (en caso de escribir).
Ejemplo fácil:
Código:
Module Port
Public Declare Function Inp Lib "C:\WINDOWS\SYSTEM32\INPOUT32.DLL" _
Alias "Inp32" (ByVal PortAddress As Integer) As Integer
Public Declare Sub Out Lib "C:\WINDOWS\SYSTEM32\INPOUT32.DLL" _
Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)
Public Function LeerPuerto() As Boolean
return Inp(&H379)
End Function
Public Function ResetearPuerto() As Boolean
Out(&H378, 0)
End Function
Public Function Enviar(ByVal i As Integer) As Boolean
Out(&H378, i)
End Function