Lee Hewitt wrote: > This PCLATH problem is driving me mad !, I am going round in circles > and still can't seem to 'reliably' cross the 256 byte page > boundaries. > .... > string3 bcf PCLATH,0 > > movlw 0x00 ;Load HIGH byte > movwf PCLATH > movlw 0xEE ;Load LOW byte > addwf char_ptr,w > btfsc STATUS,C > bsf PCLATH,0 > INCF PCLATH,f > movwf PCL > > dt "Waiting For STX",EOLN,"From Host PC ...",EOMSG ;start > ;at 1FA Lee: Is this really the code that you've been testing? As written, it will set PCLATH to either 01 or 02, rather than 00 or 01. Perhaps your "real" code doesn't include the "bsf PCLATH,0"? I noticed something else... It won't make your code work, but it might help you keep your sanity: If you put a label before each "dt" string, you can get rid of the hardcoded MOVLWs in your table lookup code... Like this: string3 bcf PCLATH,0 movlw high (TABLE3) ;Load HIGH byte movwf PCLATH movlw low (TABLE3) ;Load LOW byte addwf char_ptr,w btfsc STATUS,C INCF PCLATH,f movwf PCL TABLE3: dt "Waiting For STX",EOLN,"From Host PC ...",EOMSG This way, you can free yourself from having to count instructions, and just let the assembler calculate the appropriate PCLATH and PCL values. It'll also keep you from having to update your "start at xxx" comments every time you change your program; the comments already don't match the code. Note that I removed the "bsf PCLATH,0" from the code above... I think it'll work better that way. -Andy === Meet other PICLIST members at the Embedded Systems Conference: === 6:30 pm on Wednesday, 1 October, at Bytecraft Limited's booth. === === For more information on the Embedded Systems Conference, === see: http://www.embedsyscon.com/ === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499