|
| _testbit_| Summary | |
#include <intrins.h>
bit _testbit_ (
bit b); /* bit to test and clear */
| | Description | | The _testbit_ routine produces a JBC instruction in the generated program code to simultaneously test the bit b and clear it to 0. This routine may be used only on directly-addressable bit variables and is invalid on any type of expression. This routine is implemented as an intrinsic function. | | Return Value | | The _testbit_ routine returns the value of b. | | Example | |
#include <intrins.h>
#include <stdio.h> /* for printf */
void tst_testbit (void){
bit test_flag;
if (_testbit_ (test_flag))
printf ("Bit was set\n");
else
printf ("Bit was clear\n");
}
|
|
|
|