Null statement (NOP or CONTINUE)


Results 1 to 9 of 9

Threaded View

  1. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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.

Similar Threads

  1. Using SPI
    By The Master in forum Serial
    Replies: 6
    Last Post: - 14th March 2010, 15:37
  2. Trying to build an IR project
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 10th November 2009, 23:48
  3. Hserin
    By [email protected] in forum Serial
    Replies: 11
    Last Post: - 16th December 2008, 18:49
  4. frequency meter in PBP
    By savnik in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 13th June 2007, 06:34
  5. PIC12F675 trouble
    By russman613 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th February 2006, 18:40

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts