Lines not pulsed fast enough (?)) Should this code pulse the PB3 and PB4 pins (MOSI and MISO of an Arduino Uno) at 2ms interval ?

#include &lt;avr/io.h&gt;

int main(void) 
{

//  for (byte i = 0; i &lt; 32; i++)
//    pinMode(i, INPUT);

  DDRB |= (1 &lt;&lt; PB4);       
  DDRB |= (1 &lt;&lt; PB3);       
//  pinMode(PB4, OUTPUT);
  while (1)
  {
    PORTB &amp;= ~(1 &lt;&lt; PB4);        
    PORTB &amp;= ~(1 &lt;&lt; PB3);        
  //  digitalWrite(PB4, LOW);
//      __asm__ __volatile__("nop");
//      __asm__ __volatile__("nop");
//      __asm__ __volatile__("nop");
//      __asm__ __volatile__("nop");
//      __asm__ __volatile__("nop");
//      __asm__ __volatile__("nop");
//      __asm__ __volatile__("nop");
//      __asm__ __volatile__("nop");
//    delayMicroseconds(10000);
    delay(1);
    PORTB |= (1 &lt;&lt; PB4);        
    PORTB |= (1 &lt;&lt; PB3);        
  //  digitalWrite(PB4, LOW);
//    delayMicroseconds(10000);
    delay(1);

  }
}


If used for SPI MOSI can do 1 MHz just fine - so my logic analyzer says. MISO would not behave when used by SPI. MISO works in other non-SPI scenario: I am able to use the Arduino for in-system programming other AVR boards.

But the code above pulses neither MISO nor MOSI, as pointed out by the same logic analyzer in the same setup. Should it?

update

There has been some issue with the board. Changed it and all works fine now, regardless of using int main() alone or also calling init() as per @Majenko 's answer
The code content works fine while compiled as an Arduino program - that is, using the proper setup() and loop() structure:

void setup() {
    DDRB |= (1 &lt;&lt; PB4);       
    DDRB |= (1 &lt;&lt; PB3);       
    while (1) {
        PORTB &amp;= ~(1 &lt;&lt; PB4);        
        PORTB &amp;= ~(1 &lt;&lt; PB3);        
        delay(1);
        PORTB |= (1 &lt;&lt; PB4);        
        PORTB |= (1 &lt;&lt; PB3);        
        delay(1);
    }
}

void loop() {
}


However the same code will not work when using it in main(). This is simply because delay() will never work. Normally main() calls init() which then configures TIMER0 to generate the millis() and micros() count used for the delay() functions. 

So either use setup() and loop() instead of main(), or make your program call init() before anything else:

int main() {

    init();

    DDRB |= (1 &lt;&lt; PB4);       
    DDRB |= (1 &lt;&lt; PB3);       
    while (1) {
        PORTB &amp;= ~(1 &lt;&lt; PB4);        
        PORTB &amp;= ~(1 &lt;&lt; PB3);        
        delay(1);
        PORTB |= (1 &lt;&lt; PB4);        
        PORTB |= (1 &lt;&lt; PB3);        
        delay(1); 
    }
    return 0;
}