Well, it really depend on how the above is processed by the compiler, and on which architecture as well
Usually clearing a Variable would imply a simple asm line
CLRF _DUMMY
Or
MOVLW 0
MOVWF _DUMMY
BUT this assume you're on the right BANK... if BANK sensitive at all. Even though, there's several way to switch between BANK... and this still bring the idea of how they do it in background.
To me, NOP or GOTO $+1 (or GOTO $+2 for 18) are the best way, as they use a fixed instruction cycle and BANK insensitive AND you don't need any DUMMY variable AND you don't need to know the background process. But it's me
Last edited by mister_e; - 4th February 2009 at 18:43.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks