On Wed, 23 Jan 2002 11:03:38 -0500, Ted Mawson wrote: >Hi guys, > > > >Quick question on .asm syntax using decfsz. What's the difference >between the two following examples please? > > > >assume 'count' is a variable > > > >loop code > > code > > decfsz count, F > > goto loop > > retlw > > > >loop code > > code > > decfsz count, 1 > > goto loop > > retlw > > > >I understand that decfsz is decrementing count and if count=3D0 after = the >decrement, the next 'goto loop' instruction is skipped. I see the two >forms used all over the place and the second one makes more sense to me, >it's the use of the 'F' that's puzzling me and I haven't found any >reference (yet) to what it is. > > =46unctionally they're identical. The 'F' indicates that the result goes to the register and not to the W register.=20 =46 and W are defined in the processor include file ( F equ 1, W equ 0). (Note that if you use "decfsz count, W", the register will not decrement and the code will loop forever if the count is non-zero.) Regards, Bob -- 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