title: void loop() with noInterrupts() in arduino does not behave expectedly
body: <p>to describe my problem, i share a short code with arduino here:</p>
  
  <pre><code>int index=0;
  
  void setup()
  {
    Serial.begin(9600);
    noInterrupts();
    TCCR1A=0; // RESET
    TCCR1B=0; //RESET
    TCNT1=0;
  
    TCCR1B |= (1&lt;&lt;CS12);  // clk/256 prescaling
    TCCR1B |=(1&lt;&lt;WGM12);  // ctc mode
    OCR1A= 6250;          // 10 Hz
    TIMSK1 |=(1&lt;&lt;OCIE1A);
    interrupts();
  }
  
  ISR(TIMER1_COMPA_vect)
  {
    index++;
    Serial.println(index);
  }
  
  void loop()
  {
    if (index == 100)
    {
      Serial.println("code's here");
      noInterrupts();
  
    }
  }
  </code></pre>
  
  <p>output i expect:</p>
  
  <pre><code>1
  2
  3
  ...
  ...
  100
  code's here
  </code></pre>
  
  <p>output i get:</p>
  
  <pre><code>1
  2
  3
  ...
  ...
  98
  99
  10
  </code></pre>
  
  <p>So my <code>Serial.println("code's here")</code> is not working. i dont understand why. in fact nothing in my void loop works, while I code like this. what does this <code>noInterrupts</code> do actually? </p>
  
  <p>please give me an explanation. any help is appreciated.</p>