Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

/usr/src/redhat/BUILD/legOS/include/sys/bitops.h File Reference

H8/300 bit operations. More...


Defines

#define ASMCONST
#define bit_set (byte,bit)
set a single bit in memory. More...

#define bit_clear (byte,bit)
clear a single bit in memory. More...

#define bit_load (mask,bit)
load a single bit from a mask to the carry flag. More...

#define bit_iload (mask,bit)
load the inverse of a single bit from a mask to the carry flag. More...

#define bit_store (byte,bit)
store the carry flag to a single single bit in memory. More...


Detailed Description

H8/300 bit operations.

Author(s):
Markus L. Noga <markus@noga.de>

Define Documentation

#define ASMCONST ()

#define bit_set (byte, bit)

set a single bit in memory.

*((char*)byte)|=(1<<bit)

#define bit_clear (byte, bit)

clear a single bit in memory.

((char*)byte)&=~(1<<bit)

#define bit_load (mask, bit)

load a single bit from a mask to the carry flag.

carry=mask & (1<<bit)

#define bit_iload (mask, bit)

load the inverse of a single bit from a mask to the carry flag.

carry=mask & inverse of (1<<bit)

#define bit_store (byte, bit)

store the carry flag to a single single bit in memory.

*((char*)byte)= ( (*((char*)byte)) & (~(1<<bit)) ) | (carry<<bit)


legOS-0.1.7 is released under Mozilla Public License. Original code © 1998-1999 by Markus L. Noga.