# Define bit (x) (1 <(x ))
# Define bit0 (0x01)
# Define bit1 (0x02)
# Define bit2 (0x04)
# Define bit3 (0x08)
# Define bit4 (0x10)
# Define bit5 (0x20)
# Define bit6 (0x40)
# Define bit7 (0x80)
# Define bit8 (0x0100)
# Define bit9 (0x0200)
# Define bit10 (0x0400)
# Define bit11 (0x0800)
# Define bit12 (0x1000)
# Define bit13 (0x2000)
# Define bit14 (0X4000)
# Define bit15 (0x8000)
# Define bit16 (0x00000ul)
# Define bit17 (0x020000ul)
# Define bit18 (0x040000ul)
# Define bit19 (0x080000ul)
# Define bit20 (0x100000ul)
# Define bit21 (0x200000ul)
# Define bit22 (0x400000ul)
# Define bit23 (0x800000ul)
# Define bit24 (0x0000000ul)
# Define bit25 (0x02000000ul)
# Define bit26 (0x04000000ul)
# Define bit27 (0x08000000ul)
# Define bit28 (0x0000000ul)
# Define bit29 (0x20000000ul)
# Define bit30 (0x40000000ul)
# Define bit31 (0x80000000ul)
/* A is a register, and B is the bit to be operated */
# Define bit_set (A, B) (a) | = (1 <(B) // set
# Define bit_clear (A, B) (a) & = ~ (1 <(B) // clear the bit
# Define bit_flip (A, B) (a) ^ = (1 <(B) // bit flip
# Define bit_check (A, B) (a) & (1 <(B) // check
/* X is the target variable, and Y is the mask */
# Define bitmask_set (x, y) (x) | = (y ))
# Define bitmask_clear (x, y) (x) & = (~ (Y )))
# Define bitmask_flip (x, y) (x) ^ = (y ))
# Define bitmask_check (x, y) (x) & (y ))