void setup()
{
volatile long i,j;
unsigned char switches;
char arr[4]={1,2,32,64};
volatile char *dirf,*outf;
volatile char *dirk,*ink;
dirf=0x30; outf=0x31;
dirk=0x108; ink=0x106;
*dirf=0xFF; *dirk=0x00;
while(1)
{
switches=*ink;
if((switches & 0x02) == 0x02)
{
for(i=0;i<=3;i++)
{
*outf=arr[i];
for(j=1;j<=1000000;j++);
}
}
else*outf=0x00;
}
}
void loop()
{
}