I think that the conclusion that we came to is that location 2004 should not be programmed with a GOTO, but with the full actual address of the ICD handler code. I forget they basis on which we came to this conclusion however. Perhaps wishful thinking? Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: "S Parkis" To: Sent: Tuesday, July 17, 2001 2:13 AM Subject: [PIC]: On-Chip Debugging > Thanks to all who have pointed at Microchip's DS51242A, "PIC16F87X > Debugger Control". I've studied that so hard for the last week I > can almost recite it from memory, and still have some fundamental > questions on how this works. Here's the most mind-boggling: > > The document states on page 10 describes how the debugger code gets > control: > > "As the processor vectors to 0x2004, the CPU will fetch and > execute the instruction at this address. Therefore, address 2004 > must be programmed with a GOTO opcode, where opcode is pointing to > the beginning address of the debug code." > > I really can't wrap my head around this statement because it would > seem that the current contents of PCLATH would determine which page of > memory the GOTO statement would transfer to. Is there some special > form of GOTO that must be used? > > This is one of several questions pondered by Myke Predko, Bob > Ammerman, Tony Nixon, Dmitry Kiryashov, Olin Lathrop and Alejandro > Lavarello back in May of this year. If answered, I can't find it in > the archives... > > Any clues? Thanks, > > Steve > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.