#include "LPC3000_regs.h"


void delay(int delay);

void blinky_main(void)
{
   unsigned j=0;

  while(1)
  {
      for (j = 0x200; j < 0x400; j <<= 1) 
      {
	      *IOSET = j;
         delay(100000);
	      *IOCLR = j;
	   }
      for (j = 0x400; j > 0x200; j >>=1)
      {
	      *IOSET = j;
            delay(100000);
	      *IOCLR = j;
      }
   *DUMMY_REG = j++;
  }

}

void delay(int delay)
{
   while (delay)
   {
      delay--;
   }
} /* delay */