As said the basic functions of the 16C are here but there is still a lot of them missing.
But you can create the ones you need by yourself:
EXPORT BITSET(Word, BitNum)
BEGIN
LOCAL Tmp;
Tmp:= BITSL(SETBITS(#1,GETBITS(Word)), BitNum);
RETURN BITOR(Word, Tmp);
END;
EXPORT BITCLEAR(Word, BitNum)
BEGIN
LOCAL Tmp;
Tmp:= BITSL(SETBITS(#1,GETBITS(Word)), BitNum);
RETURN BITAND(Word, BITNOT(Tmp));
END;
EXPORT BITTEST(Word, BitNum)
BEGIN
LOCAL Tmp;
Tmp:= BITSL(SETBITS(#1,GETBITS(Word)), BitNum);
RETURN (BITAND(Word, Tmp) <> #0);
END;
EXPORT BIT#(Word)
BEGIN
LOCAL Tmp, Cnt;
Cnt:= 0;
WHILE Word <> #0 DO
IF BITAND(Word, #1) <> #0 THEN Cnt:= Cnt+1; END;
Word:= BITSR(Word,1);
END;
RETURN Cnt;
END;
Edited: 21 Aug 2013, 3:52 p.m.