"Olin Lathrop" wrote: > > I have two incf instructions: > > movf baasaadress,w > > movwf FSR > > incf FSR,f > > incf FSR,f > > > > In simulator everything is well, but in action it seems that FSR > > is increased only once. Is it possible that two incf instructions > > in succession can result only one increase? > > So unlikely it's not worth considering. There is something else > wrong. Until you believe that you won't be able to find and fix it. > Is the bank set properly when fetching BAASAADRESS? I'd suspect incomplete simulation, not a bank-setting issue. I imagine that the code's being simulated by manually putting a number in baasaadress, then running the four lines above. Maybe some small portion of the code above this four-line fragment is being simulated, but in any case, a complete simulation from power-on reset isn't being performed. In the real system, of course, there are thousands or millions of instructions that execute before these four. If I had to guess at the root cause of the problem, I'd say that at the start of these four lines, baasaadress already contains a value that's one less than expected, and that if a true simulation from power-up were performed, the conclusion would not be "in simulator everything is well." -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.