FlipBit Routines
Flips specified Bit of a BitList, ie 0 becomes 1 and 1 becomes 0.

Unit
QESBPCSSystem

Overloaded Variants
Procedure FlipBit(var BitList: TESBBitList; const I: Byte);
Procedure FlipBit(var BitList: TESBLongBitList; const I: Byte);

Declaration
Procedure FlipBit(var BitList: TESBBitList; const I: Byte);

Parameters
BitList BitList to process.
Bit to clear, starts at 0.

Category
Memory Operations

Implementation

procedure FlipBit (var BitList: TESBBitList; const I: Byte);
asm
	and edx, $0f
  	btc [eax], edx  //Complement the bit #I
End;

Declaration
Procedure FlipBit(var BitList: TESBLongBitList; const I: Byte);

Implementation

procedure FlipBit (var BitList: TESBLongBitList; const I: Byte);
asm
  	and edx, $1f
  	btc [eax], edx  //Complemente the bit #I
End;


HTML generated by Time2HELP
http://www.time2help.com