Hello Mike. Seems to be skip_if_Zero logic is fault in case of decfsz PCL,f command in example I was offer to discussion. WBR Dmitry. > >What will happen after the following set of commands will be executed ? > > > > org xx0 > > > > decfsz pcl,f > > cmd_1 ;next cmd > > cmd_2 ;etc. > > > I doubt the PIC's skip logic is complex enough to "properly" handle the > situation of a modify PCL also causing a skip. The modify PCL would > trigger a skip (of cmd_1) by itself, then the decfsz instruction would be > fetched again. The decfsz instruction will repeatedly execute in an > infinite loop. > > If the logic is designed to skip the re-fetched decfsz instruction, then > cmd_1 would be executed. But that's a long shot, such "delayed skip" > logic would only act in this case so it wouldn't make much sense to build > it into every PIC.