ClearBit Routines
Sets specified Bit of a BitList to 0.

Unit
QESBPCSSystem

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

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

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

Category
Memory Operations

Implementation

procedure ClearBit (var BitList: TESBBitList; const I: Byte);
asm
	and edx, $0f    //Should be faster than "movzx edx, dl"
  	btr [eax], edx  //Clear the bit #I
End;

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

Implementation

procedure ClearBit (var BitList: TESBLongBitList; const I: Byte);
asm
	and edx, $1f    //Should be faster than "movzx edx, dl"
  	btr [eax], edx  //Clear the bit #I
End;


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