Hi,
Just a couple of random notes.
PBC is now discontinued so if you don't already have it it's probably not something to persue. You said PBC is free - I didn't know that, did you get it with the book? Anyway, it's an old product and it's harder (quite a bit harder) to use and less capable than PBP, besides I'm pretty sure it doesn't support ANY of the newer PIC like the 18F25K22 (I haven't checked that though).

I don't think you can use the Amicus IDE with any other compiler than the one that comes with the IDE. That compiler is a special version of the Proton compiler "only" supporting the 25K20 and 25K22 devices. There are a lot more differences between the two chips besides the operating voltage range by the way.

If you DO intend to use MELABS compiler their Experimenter Edition costs $49 and supports 25K22 as well as a couple of others. A popular IDE for the PBP compiler is MicroCodeStudio. On the other hand the AmicusIDE and compiler are free... However this forum is not targeting that compiler so if you're going down that route questions would be better suited on the Amicus forum.

DIRS is not for the PRO compiler, ie MELABS PBP and TRIS is not a command, it's a name of a register in the PIC. The TRIS register is what controls the "direction" of the I/O pin as you've discovered. To set it you can do (for example) TRISB=%10101010 or TRISB=170 which both results in the same thing. With PBC however you can't do that because it doesn't allow access to registers in that way, you have to take the datasheet, find at which adress in memory in memory the TRIS register is located and then use the POKE command to assign a value to that adress. But again, I don't think you can even use PBC for the PIC you're targeting.

/Henrik.