#include <iom8535v.h>
#include <macros.h.>
#define S 175000
void port_init(void)
{
PORTA=0x81; //na vhod
DDRA=0x00;
PORTB=0x00;
DDRB=0xF0; //na vihod
}
void main(void)
{
long i;
int k;
int b=1;
port_init();
k=1;
while(b=1)
{
if (PINA&1==1)
{
for(1;i<S;i++); //zaderzhka govnojopa
PORTB=PINA&128;
}
if (PINA&1==1)
{
for(1;i<S;i++);
PORTB=PORTB|PINA>>1;
}
if (PINA&1==1)
{
for(1;i<S;i++);
PORTB=PORTB|PINA>>2;
}
if (PINA&1==1)
{
for(1;i<S;i++);
PORTB=PORTB|PINA>>3;
}
b=0;
}
}
I2luY2x1ZGUgPGlvbTg1MzV2Lmg+CiNpbmNsdWRlIDxtYWNyb3MuaC4+CiNkZWZpbmUgUyAxNzUwMDAKIAp2b2lkIHBvcnRfaW5pdCh2b2lkKQp7ClBPUlRBPTB4ODE7IC8vbmEgdmhvZApERFJBPTB4MDA7ClBPUlRCPTB4MDA7IApERFJCPTB4RjA7IC8vbmEgdmlob2QKfQogCiAKdm9pZCBtYWluKHZvaWQpCnsKbG9uZyBpOwppbnQgazsKaW50IGI9MTsKcG9ydF9pbml0KCk7Cms9MTsKd2hpbGUoYj0xKQp7CmlmIChQSU5BJjE9PTEpCnsKZm9yKDE7aTxTO2krKyk7IC8vemFkZXJ6aGthIGdvdm5vam9wYQpQT1JUQj1QSU5BJjEyODsKfQppZiAoUElOQSYxPT0xKQp7CmZvcigxO2k8UztpKyspOwpQT1JUQj1QT1JUQnxQSU5BPj4xOwp9CmlmIChQSU5BJjE9PTEpCnsKZm9yKDE7aTxTO2krKyk7ClBPUlRCPVBPUlRCfFBJTkE+PjI7Cn0KaWYgKFBJTkEmMT09MSkKewpmb3IoMTtpPFM7aSsrKTsKUE9SVEI9UE9SVEJ8UElOQT4+MzsKfQpiPTA7Cn0KfQ==