>I have recently discovered the PIC16C84 - it is indeed a wonderous chip! > However, I struck a problem with my >first large-ish program. > >All went well until I added another small bit of code and it crashed. I > backtracked and started to de-bug it. >After a number of frustrating hours and much fiddling, I discovered that the > problem occured only when the >program reached 256 bytes. Originally, the last operation was a RETLW. When I > moved this up the program, the >problem disappeared! Further investigation showed that a RETURN or RETLW on the > 100H boundary would not work - >it seems to lose the return address. Any comments? I am using MPASM 1.40 How are you jumping to the return/retlw? If you are using a computed jump (ie movlw EndOff/addwf PCL, f) and the return is at 0x0100, you're gonna have problems (PCLATH has to be changed). Are you simulating the program (this should show you exactly what happens). If it is the computed jump, then you will see the code jump to 0, not 0x0100. myke "There are only three kinds of economists in the world. Those who can count and those who can't." - Eddy George, governor of the Bank of England