Ксения (20.04.2009 03:54, просмотров: 217) ответил picavr на Доброго времени суток, начал изучать Си, (асм уже лет 10)
Вот так было бы экономно оттранслировано:
unsigned long read_32key(void)
{
union
{
struct
{ unsigned char a;
unsigned char b;
unsigned char c;
unsigned char d;
} byte;
unsigned long all;
} tempkey;
tempkey.a = ~PINA;
tempkey.b = ~PINB;
tempkey.c = ~PINC;
tempkey.d = ~PIND;
return tempkey.all;
}