On Wed, 6 Sep 2000, Thomas C. Sefranek wrote: > I may have found an obscure bug in the 452. > > I am using a Jump table (Vector table) I designed to provide 128 possible > vectors > relative to the value of the W (Index). > > It works 99% of the time.... > > BUT, If I get an interupt coincident with the code on line 28: > MOVFF PCLOW,PCL > The PIC stack the next address as the return address instead of the address I > just built! > So I have a hack fix to keep my program working. (See the next line of code.) > But I should like to hear from you folks, any ideas? Is this a genuine bug? > (Did I miss the warning somewhere?) yuck. > > FIX I made: > 00021C C01A FFF9 00028 Bug_Fix MOVFF PCLOW,PCL ; Goto supporting routine for > this state. > 000220 EF0E F001 00029 GOTO Bug_Fix ; Hack fix. > 00030 ; > 000224 0000 00031 MENU_TABLE DW 0 ; Dummy address. Another fix would be: MOVF PCLOW,W MOVWF PCL with the side affect that W is trashed. Scott -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.