void setup() 
{
 volatile long i,j;
 volatile char *dirf, *dirk, *dira, *dirc;
 volatile char *outf, *ink, *outa, *outc;
 dirf=0x30; dirk=0x107; dira=0x21, dirc=0x27;
 outf=0x31; ink=0x106; outa=0x22, outc=0x28;

 *dirf=0x0f;
 *dirk=0x00;
  while(1)
    {
      
        for(i=0;i<2;i++)
        {
        *outf=1<<i;
        *outa=*ink;
        if(*ink != 0)
        {
          *outc=1<<i;
          *outc=0;
          
        }



        }
        
      
    }  
  
  

}
void loop() 
{
  

}