title: "Label" in Assembly language
body: <p>I have couple of examples which are pretty simple except LABEL concept.
  Example 1 adds 25 10 times in itself, whereas example 2 takes complement of Register A 700 times.</p>
  
  <pre><code>Example-1:    MOV A,#0
                MOV R2,#10
  AGAIN:        ADD A,#25
                DJNZ R2,AGAIN
                MOV R5,A
  
  Example-2:
                MOV A,#55H   
                MOV R3,#10
  NEXT:         MOV R2,#70
  AGAIN:        CPL A
                DJNZ R2,AGAIN
                DJNZ R3,NEXT
  </code></pre>
  
  <p>I am unable to understand the concept of LABEL. In example-1, when first time program runs, A gets value 25, and then when R2 decrements from 10 to 1, output is 275 instead of 250. But if I assume that LABEL is bypassed unless it is called, then things are ok and I get result 250. But if I assume the same thing (bypassing the LABEL in step by step execution) in Example-2, then LABEL NEXT will be bypassed. And "DJNZ R2,AGAIN" will be executed. As NEXT was bypassed, then how will R2 get the value #70? So my question is about execution of LABEL. Are the LABELS executed or bypassed?</p>