VB Code:
Public Declare Function PortIn Lib "IO" (ByVal Port As Integer) As Byte
Public Declare Sub PortOut Lib "IO" (ByVal Port As Integer, ByVal Value As Integer)
Public Declare Sub SetPortBit Lib "IO" (ByVal Port As Integer, ByVal Bit As Integer)
Public Declare Sub ClrPortBit Lib "IO" (ByVal Port As Integer, ByVal Bit As Integer)
Public Declare Sub NotPortBit Lib "IO" (ByVal Port As Integer, ByVal Bit As Integer)
Public Declare Function GetPortBit Lib "IO" (ByVal Port As Integer, ByVal Bit As Integer) As Integer
Public Declare Sub RightPortShift Lib "IO" (ByVal Port As Integer, ByVal ShiftIn As Integer)
Public Declare Sub LeftPortShift Lib "IO" (ByVal Port As Integer, ByVal ShiftIn As Integer)
Public Const DPort = &H378
Public Const SPort = &H379
Public Const CPort = &H37A
The three ports (DPort, for Data Port, CPort, for Control Port, and SPort, for status port) are the standard ports if you have an LTP1 port on your motherboard.