[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
я давно пользуюсь. Неограниченной разрядности не обещаю, но можно сделать для любой наперед заданной. Мне хватало байта:
--------------------------
#define _bitset(bits)\
((byte)(\
(bits%010)|\
(bits/010%010)<<1|\
(bits/0100%010)<<2|\
(bits/01000%010)<<3|\
(bits/010000%010)<<4|\
(bits/0100000%010)<<5|\
(bits/01000000%010)<<6|\
(bits/010000000%010)<<7))
#define BITSET(bits) _bitset(0##bits)
---------------------------
Использование:
PORTA=BITSET(10101010);
E-mail: info@telesys.ru