HP85 GPIB Disk Emulator  1.0
HP85GPIBDiskEmulator
Macros
bits.h File Reference

Bit manipulation macros. More...

Go to the source code of this file.

Macros

#define BIT_SET(x, y)   (x |= (1 << (y)))
 Note: IF x and y are constants the compiler will fully reduce the expression. More...
 
#define BIT_CLR(x, y)   (x &= ~(1 << (y)))
 
#define BIT_TST(x, y)   ((x & (1 << (y))) ? (int) 1 : (int) 0)
 

Detailed Description

Bit manipulation macros.

Edit History
  • [1.1] [Mike Gore] Initial revision of file.
Copyright © 2014-2020 Mike Gore, Inc. All rights reserved.

Definition in file bits.h.

Macro Definition Documentation

◆ BIT_CLR

#define BIT_CLR (   x,
 
)    (x &= ~(1 << (y)))

Definition at line 18 of file bits.h.

◆ BIT_SET

#define BIT_SET (   x,
 
)    (x |= (1 << (y)))

Note: IF x and y are constants the compiler will fully reduce the expression.

Definition at line 17 of file bits.h.

◆ BIT_TST

#define BIT_TST (   x,
 
)    ((x & (1 << (y))) ? (int) 1 : (int) 0)

Definition at line 19 of file bits.h.