To access the ports you will need to set the appropriate bit in the STATUS (I think it's bit 5) register so that you are in page 1. Then set the appropriate bits in the TRISA, TRISB, or TRISC register to configure the pin on each port as an input or output (1 for input, 0 for output). You should be able to use the picreg.equ file to get the addresses of the registers. Don't forget to change back to page 0. Stuart Allman studio@halcyon.com