GE-115 Emulator
An Emulator of the General Electrics GE-115 computer
Macros
bit.h File Reference

Bit manipulation helpers. More...

Go to the source code of this file.

Macros

#define BIT(V, X)   ( !!(V & (1 << X)))
 
#define SET_BIT(R, X)   (R = (R | (1 << X)))
 
#define RESET_BIT(R, X)   (R = (R & ~(1 << X)))
 
#define NIBBLE_MASK(X)   (0xf << ((X-1)*4))
 

Detailed Description

Bit manipulation helpers.

Definition in file bit.h.

Macro Definition Documentation

◆ BIT

#define BIT (   V,
  X 
)    ( !!(V & (1 << X)))

Definition at line 9 of file bit.h.

◆ NIBBLE_MASK

#define NIBBLE_MASK (   X)    (0xf << ((X-1)*4))

Definition at line 15 of file bit.h.

◆ RESET_BIT

#define RESET_BIT (   R,
  X 
)    (R = (R & ~(1 << X)))

Definition at line 11 of file bit.h.

◆ SET_BIT

#define SET_BIT (   R,
  X 
)    (R = (R | (1 << X)))

Definition at line 10 of file bit.h.