//10. Press 1st switch & Press 4th switch & Press 7th switch &
//Press 6th switch One by One
// Glow 5th LED
//Press 4th switch & Press 7th switch & Press 6th switch &
//Press 3rd switch & One by One
//OFF 5th LED
void setup() {
// put your setup code here, to run once:
volatile char *dir_f;
volatile char *dir_k;
volatile char *out_f;
volatile char *in_k;
volatile char x;
volatile long j;
dir_f = 0x30;
out_f = 0x31;
dir_k = 0x107;
in_k = 0x106;
*dir_f = 0xff;
*dir_k = 0x00;
while(1)
{
x = *in_k;
if(((x & 0x02) == 0x02) | ((x & 0x10) == 0x10) | ((x & 0x80) == 0x80) | ((x & 0x40) == 0x40))
{
*out_f = 0x20;
}
if(((x & 0x10) == 0x10) | ((x & 0x80) == 0x80) | ((x & 0x40) == 0x40) | ((x & 0x08) == 0x08))
{
*out_f = 0x00;
}
}
}
void loop() {
// put your main code here, to run repeatedly:
}