### __getCPUFlags -- Get Value of EFLAGS Register

Format

>     #include <builtin.h>

>     unsigned int __getCPUFlags(void)

Language Level: None
__getCPUFlags gets the value of the cpu's EFLAGS register. The builtin.h header file provides defines for each of the bits within the EFLAGS register. Refer to the Intel Programmer's Reference manual for further information regarding the EFLAGS register.

Return Value
Returns the value of the cpu's EFLAGS register as an unsigned integer.

Example
This example prints out the current value of the cpu's EFLAGS register.

    #include <stdio.h>
    #include <builtin.h>

    int main(void)
    {
       unsigned int flags = __getCPUFlags();

       printf("The cpu flags are currently %.8x\n", flags);

       /********************************************
          The output should be something like:

          The cpu flags are currently 00000216
       ********************************************/

       return 0;
    }

__setCPUFlags -- Set Value of EFLAGS Register