BITSET sets the value of a specified bit in the bit table to 1 and returns the value of the bit before it was changed.
table_no specifies the bit to be SET. If table_no evaluates to zero, all elements in the table are set to 1 (one) and the returned value is one.
A unique table of 128 bits (numbered 1 to 128) is maintained for each process. Each bit in the table is treated as a two-state flag - the value returned will always be 0 (zero) or 1.
BITSET returns the value of the bit before it was changed - checking and setting a flag can be accomplished in one step.
BITSET also provides some special functions if you use one of the following table_no values:
See also BITRESET.
If table entry 112 is 0, returns a value of 0, sets bit 112 to 1, and prints 0. If table entry 112 is 1, returns a value of 1, and prints 1.