#define N asm volatile("RJMP .+0")
void setup(){pinMode(3, OUTPUT);}
void loop(){
 digitalWrite(3,LOW);
 delayMicroseconds(50);
 noInterrupts();
 for (int i=0;i<256*24;i++) {
  PORTD=~0;
  if (i&8){N;N;N;N;PORTD=0;N;N;N;}else{N;PORTD=0;N;N;N;N;N;}
 }
 interrupts();
}