Gday Melanie
I have read section 4.11 forwards and backwards, many times, and it doesnt cover what i posted. ( My booklet has a print date of 8/02 )

According to sect 4.11, i can only use pins of 0-15 to address ports. For a 28 pin device these cover ports C and D
In my example, i started by addressing port A.
Also, in my case, the corresponding numbers used are not fixed to 0-15, but depend on what offset you start with. In my example i was up to 23 and still going ( starting from PortA.0 )

Also there is no discussion in the book on the syntax used ie
XPort(3) where the (3) is the relative offset ie

If i go
XPort = PortB.0 then XPort(4) equates to PortB.4

if i then redefine the start point ie
XPort = PortB.2 now XPort(2) equates to PortB.4

In both cases i access PortB.4 but use a different index.
I can find no discussion of this behaviour in the manual supplied with my PBP Pro 2.43, only in the basic stanmp manual. ( And not real clear there either )
I will still read yr referenced link, but was just enquiring into whether or not this method of addressing ports was ok with a std PIC.
Andrew