|
| _testset_| Summary | |
#include <intrins.h>
bit _testset_ (
bit b); /* bit to test and set */
| | Description | | The _testset_ routine generates a JNBS instruction in the generated program code to simultaneously test the bit and set it to 1. This routine can be used only on directly addressable bit variables and is invalid on any other type of expression. This routine is implemented as an intrinsic function. The code required is included inline rather than being called. | | Return Value | | The _testset_ routine returns 1 if the bit was clear and 0 otherwise. | | See Also | | _testclear_ | | Example | |
#include <intrins.h>
#include <stdio.h> /* for printf */
void tst_testset (void) {
bit test_flag;
if (_testset_ (test_flag))
printf ("Bit was clear\n");
else
printf ("Bit was set\n");
}
|
Related Knowledgebase Articles |
|