You'll need as much code as:

INPUT PortX.n

see PBP Manual Section 5.37