void setup()
{
volatile char *dirf,*outf;
dirf=0x30; outf=0x31;
volatile char *dirk,*ink;
dirk=0x107; ink=0x106;
*dirf=0xFF; *dirk=0x00;
volatile char switches;
loop: while(1)
{
switches = *ink;
if((switches & 1 )== 1) // 1th switch
{
while(1)
{
switches = *ink;
if((switches & 8) == 8) // 4th switch
{
while(1)
{
switches = *ink;
if((switches & 64) == 64)// 7th switch
{
while(1)
{
switches = *ink;
if((switches & 32) == 32)// 6th switch
{
*outf=128;
for(volatile long n=0;n<=100000;n++);//delay
*outf=0;
goto loop;
}
}
}
}
}
}
}
}
}
void loop()
{
}