void setup()
{
volatile char *dirf,*outf;
volatile char *dirk,*ink;
dirf=0x30; outf=0x31;
dirk=0x107; ink=0x106;
*dirf=0xFF; *dirk=0x00;
volatile char switches;
loop: while(1)
{
switches=*ink;
if((switches & 1) == 1)
{
while(1)
{
switches=*ink;
if((switches & 8) == 8)
{
while(1)
{
switches=*ink;
if((switches & 64) == 64)
{
while(1)
{
switches=*ink;
if((switches & 32) == 32)
{
*outf=16;
goto loop;
}
}
}
}
}
}
}
else
{
switches=*ink;
if((switches & 8) == 8)
{
while(1)
{
switches=*ink;
if((switches & 64) == 64)
{
while(1)
{
switches=*ink;
if((switches & 32) == 32)
{
while(1)
{
switches=*ink;
if((switches & 128) == 128)
{
*outf=0;
goto loop;
}
}
}
}
}
}
}
}
}
}
void loop()
{
}