on 1/1/02 11:59 PM, S Parkis at parkiss@EARTHLINK.NET wrote: Hi Steve, Thanks for your reply. > The PAGESEL directives are generating instructions, which are skipped > on zero rather than your subsequent GOTO instructions. Result--the > GOTO is always executed and you never return from the subroutine. Try > commenting out the PAGESEL directives to see if this is indeed the > problem. My silly BASIC to Assembler compiler puts these in. When I build the file with MPLAB, I get a "message" that the PAGESEL is not necessary, and no code was generated. But I will comment them out and try again. On a related note though, I also get another two messages - relating to lines 13 and 15 - (MOVWF TRISA and MOVWF TRISB) - "Register in operand not in bank 0. Ensure that bank bits are correct." - so I now suspect this could be my problem. I do not understand this bank switching stuff. Cheers, Sean -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads