Sage-ST ä

Bitlib

Documentation

Unit Documentation (Unit description)
BitAnd BitAndDWord BitAndWord
BitAndWordEmpty BitDif BitDifDWord BitDifWord
BitKnt BitKntDWord BitKntWord BitNot
BitNotDWord BitNotWord BitOr BitOrDWord
BitOrWord BitXor BitXorDWord BitXorWord
ByteAnd Card16Excl Card16Incl DWordAnd
Excl Incl Included MaskLeft
MaskRight ShiftLeftAround ShiftLeftAround16 ShiftLeftOff
ShiftLeftOffArray ShiftRightAround ShiftRightOff ShiftRightOffArray
WordAnd





  //*
  //  BitLib - Routines for doing testing and manipulation of bits.
  //
  //
  //  This unit contains routines which test bits to ascertain their current
  //  settings as well as routines to change the settings.
  //
  //  NOTE - Delphi Assembly Language Register saving conventions
  //
  //  Procedures and functions must preserve the EBX, ESI, EDI, and EBP registers,
  //  but can modify the EAX, EDX, and ECX registers. When implementing a
  //  constructor or destructor in assembler, be sure to preserve the DL register.
  //  Procedures and functions are invoked with the assumption that the CPU's
  //  direction flag is cleared (corresponding to a CLD instruction) and must
  //  return with the direction flag cleared.
  //




  function Included
             (const TheSet : ModSys.BitSet;
              const bit    : cardinal) : boolean; stdcall;

  exports Included name 'BitLib_Included';

  //*
  //  Included - Check if a bit is set.
  //
  //
  //  This procedure checks the setting of a bit within a word.
  //
  //  CALLING SEQUENCE -
  //
  //    b := Included (set, bit);
  //
  //  ENTRY -
  //
  //    set : ModSys.Bitset
  //      The word containing the bit to be checked.
  //
  //    bit : cardinal
  //      The number of the bit to check (0 .. 15).
  //
  //  EXIT -
  //
  //    b : boolean
  //      True if 'bit' is set in 'set'.
  //




  procedure Incl
             (var   TheSet : ModSys.CARD16;
              const bit    : cardinal); overload; stdcall;

  exports Incl (var   TheSet : ModSys.CARD16;
                const bit    : cardinal) name 'BitLib_Card16Incl';

  //*
  //  Incl - Set a bit within a word.
  //
  //
  //  This procedure sets a specified bit within a word.
  //
  //  CALLING SEQUENCE -
  //
  //    Incl (set, bit);
  //
  //  ENTRY -
  //
  //    set : cardinal
  //      The word containing the bit to be set.
  //
  //    bit : cardinal
  //      The number of the bit to set (0 .. 15).
  //
  //  EXIT -
  //
  //    set : cardinal
  //      The word containing the set bit.
  //




  procedure Incl
             (var   TheSet : ModSys.BitSet;
              const bit    : cardinal); overload; stdcall;

  exports Incl (var   TheSet : ModSys.BitSet;
                const bit    : cardinal) name 'BitLib_Incl';

  //*
  //  Incl - See documentation of Incl.
  //




  procedure Excl
             (var   TheSet : ModSys.CARD16;
              const bit    : cardinal); overload; stdcall;

  exports Excl (var   TheSet : ModSys.CARD16;
                const bit    : cardinal) name 'BitLib_Card16Excl';

  //*
  //  Excl - Reset (set to 0) a bit within a word.
  //
  //
  //  This  procedure resets  (set to  0) a  specified bit within a
  //  word.
  //
  //  CALLING SEQUENCE -
  //
  //    Excl (set, bit);
  //
  //  ENTRY -
  //
  //    set : cardinal
  //      The word containing the bit to be reset.
  //
  //    bit : cardinal
  //      The number of the bit to reset (0 .. 15).
  //
  //  EXIT -
  //
  //    None
  //      N/A
  //




  procedure Excl
             (var   TheSet : ModSys.BitSet;
              const bit    : cardinal); overload; stdcall;

  exports Excl (var   TheSet : ModSys.BitSet;
                const bit    : cardinal) name 'BitLib_Excl';

  //*
  //  Excl - See documentation of Excl.
  //




  function MaskLeft
             (const bits : cardinal) : ModSys.BitSet; stdcall;

  exports MaskLeft name 'BitLib_MaskLeft';

  //*
  //  MaskLeft - Return mask with specified number of left bits set.
  //
  //
  //  This procedure  returns a word  with the specified  number of
  //  left (higher order) bits set.
  //
  //  For  example 'set  :=  MaskLeft (3);'  returns 'set'  equal to
  //  0E0H.
  //
  //  CALLING SEQUENCE -
  //
  //    set := MaskLeft (bits);
  //
  //  ENTRY -
  //
  //    bits : cardinal
  //      The number of left bits to set.
  //
  //  EXIT -
  //
  //    set : cardinal
  //      The word containing 'bits' left bits set.
  //




  function MaskRight
             (const bits : cardinal) : ModSys.BitSet; stdcall;

  exports MaskRight name 'BitLib_MaskRight';

  //*
  //  MaskRight - Return mask with specified right bits set.
  //
  //
  //  This procedure  returns a word  with the specified  number of
  //  right (lower order) bits set.
  //
  //  For  example 'set  := MaskRight (3);'  returns 'set'  equal to
  //  007H.
  //
  //  CALLING SEQUENCE -
  //
  //    set := MaskRight (bits);
  //
  //  ENTRY -
  //
  //    bits : cardinal
  //      The number of right bits to set.
  //
  //  EXIT -
  //
  //    set : cardinal
  //      The word containing 'bits' right bits set.
  //




  procedure ShiftLeftOff
             (var   TheSet : cardinal;
              const bits   : cardinal); stdcall;

  exports ShiftLeftOff name 'BitLib_ShiftLeftOff';

  //*
  //  ShiftLeftOff - Shift bits left without wrap around.
  //
  //
  //  This  procedure left  shifts a  word the  specified number of
  //  bits. In a left shift the  highest order bits are shifted off
  //  first. The right (lower order) bits are set to zero (0).
  //
  //  CALLING SEQUENCE -
  //
  //    ShiftLeftOff (TheSet, bits);
  //
  //  ENTRY -
  //
  //    TheSet : cardinal
  //      The word containing the bits to be shifted.
  //
  //    bits : cardinal
  //      The number of bits to shift off (0 .. 16).
  //
  //  EXIT -
  //
  //    TheSet : cardinal
  //      The original word with bits shifted.
  //




  procedure ShiftRightOff
             (var   TheSet : ModSys.BitSet;
              const bits   : cardinal); stdcall;

  exports ShiftRightOff name 'BitLib_ShiftRightOff';

  //*
  //  ShiftRightoff - Shift bits right without wrap around.
  //
  //
  //  This procedure  right shifts a  word the specified  number of
  //  bits. In a right shift the  lowest order bits are shifted off
  //  first. The left (higher order) bits are set to zero (0).
  //
  //  CALLING SEQUENCE -
  //
  //    ShiftRightOff (TheSet, bits);
  //
  //  ENTRY -
  //
  //    TheSet : cardinal
  //      The word containing the bits to be shifted.
  //
  //    bits : cardinal
  //      The number of bits to shift off (0 .. 16).
  //
  //  EXIT -
  //
  //    TheSet : cardinal
  //      The original word with bits shifted.
  //




  procedure ShiftLeftAround16
             (var   TheSet : ModSys.BIT16;
              const bits   : cardinal); stdcall;

  exports ShiftLeftAround16 name 'BitLib_ShiftLeftAround16';

  //*
  //  ShiftLeftAround16 - Shift 16 bits left with wrap around.
  //
  //
  //  This procedure left shifts a word around the specified number
  //  of bits.  In a left shift  around the highest order  bits are
  //  shifted around to the right side (lower order bits).
  //
  //  CALLING SEQUENCE -
  //
  //    ShiftLeftAround16 (TheSet, bits);
  //
  //  ENTRY -
  //
  //    TheSet : Modsys.Bit16
  //      The word containing the bits to be shifted.
  //
  //    bits : cardinal
  //      The number of bits to shift around (0 .. 16).
  //
  //  EXIT -
  //
  //    TheSet : ModSys.Bit16
  //      The original word with bits shifted.
  //




  procedure ShiftLeftAround
             (var   TheSet : ModSys.BitSet;
              const bits   : cardinal); stdcall;

  exports ShiftLeftAround name 'BitLib_ShiftLeftAround';

  //*
  //  ShiftLeftAround - Shift bits left with wrap around.
  //
  //
  //  This procedure left shifts a word around the specified number
  //  of bits.  In a left shift  around the highest order  bits are
  //  shifted around to the right side (lower order bits).
  //
  //  CALLING SEQUENCE -
  //
  //    ShiftLeftAround (TheSet, bits);
  //
  //  ENTRY -
  //
  //    TheSet : cardinal
  //      The word containing the bits to be shifted.
  //
  //    bits : cardinal
  //      The number of bits to shift around (0 .. 16).
  //
  //  EXIT -
  //
  //    TheSet : cardinal
  //      The original word with bits shifted.
  //




  procedure ShiftRightAround
             (var   TheSet : ModSys.BitSet;
              const bits   : cardinal); stdcall;

  exports ShiftRightAround name 'BitLib_ShiftRightAround';

  //*
  //  ShiftRightAround - Shift bits right with wrap around.
  //
  //
  //  This  procedure  right  shifts  a  word  around the specified
  //  number of bits. In a right shift around the lowest order bits
  //  are shifted around to the left side (higher order bits).
  //
  //  CALLING SEQUENCE -
  //
  //    ShiftRightAround (TheSet, bits);
  //
  //  ENTRY -
  //
  //    TheSet : cardinal
  //      The word containing the bits to be shifted.
  //
  //    bits : cardinal
  //      The number of bits to shift around (0 .. 16).
  //
  //  EXIT -
  //
  //    TheSet : cardinal
  //      The original word with bits shifted.
  //




  procedure BitAnd
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitAnd name 'BitLib_BitAnd';

  //*
  //  BitAnd - Bit-wise and two byte arrays.
  //
  //
  //  This procedure bit-wise ands  'bitLength' bytes from 'bitsIn'
  //  into bytes in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitAnd (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of bytes.
  //
  //    bitsOut : pointer
  //      The address of the output array of bytes.
  //
  //    bitLength : cardinal
  //      The number of bytes to and.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array anded with the 'bitsIn' array.
  //




  procedure BitAndWord
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitAndWord name 'BitLib_BitAndWord';

  //*
  //  BitAndWord - Bit-wise and two word arrays.
  //
  //
  //  This procedure bit-wise ands  'bitLength' words from 'bitsIn'
  //  into words in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitAndWord (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of words.
  //
  //    bitsOut : pointer
  //      The address of the output array of words.
  //
  //    bitLength : cardinal
  //      The number of words to and.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array anded with the 'bitsIn' array.
  //




  function BitAndWordEmpty
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal) : boolean; stdcall;

  exports BitAndWordEmpty name 'BitLib_BitAndWordEmpty';

  //*
  //  BitAndWordEmpty - Bit-wise and two word arrays, return empty status.
  //
  //
  //  This procedure bit-wise ands  'bitLength' words from 'bitsIn'
  //  into words in 'bitsOut', and returns the empty status.
  //
  //  CALLING SEQUENCE -
  //
  //    empty := BitAndWordEmpty (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of words.
  //
  //    bitsOut : pointer
  //      The address of the output array of words.
  //
  //    bitLength : cardinal
  //      The number of words to and.
  //
  //  EXIT -
  //
  //    empty : boolean
  //      True if the  anded 'bitsOut' array is empty  (has no bits
  //      set).
  //
  //    bitsOut : pointer
  //      The array anded with the 'bitsIn' array.
  //




  procedure BitOr
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitOr name 'BitLib_BitOr';

  //*
  //  BitOr - Bit-wise OR two byte arrays.
  //
  //
  //  This procedure  bit-wise ORs 'bitLength'  bytes from 'bitsIn'
  //  into bytes in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitOr (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of bytes.
  //
  //    bitsOut : pointer
  //      The address of the output array of bytes.
  //
  //    bitLength : cardinal
  //      The number of bytes to OR.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array ORed with the 'bitsIn' array.
  //




  procedure BitOrWord
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitOrWord name 'BitLib_BitOrWord';

  //*
  //  BitOrWord - Bit-wise OR two word arrays.
  //
  //
  //  This procedure  bit-wise ORs 'bitLength'  words from 'bitsIn'
  //  into words in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitOrWord (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of words.
  //
  //    bitsOut : pointer
  //      The address of the output array of words.
  //
  //    bitLength : cardinal
  //      The number of words to OR.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array ORed with the 'bitsIn' array.
  //




  procedure BitDif
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitDif name 'BitLib_BitDif';

  //*
  //  BitDif - Bit-wise and one byte array with the not of another.
  //
  //
  //  This procedure bit-wise ands 'bitLength' bytes into 'bitsOut'
  //  with the not of bytes from 'bitsIn'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitDif (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of bytes.
  //
  //    bitsOut : pointer
  //      The address of the output array of bytes.
  //
  //    bitLength : cardinal
  //      The number of bytes to process.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array  anded with  the not  of the  'bitsIn'
  //      array.
  //




  procedure BitDifWord
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitDifWord name 'BitLib_BitDifWord';

  //*
  //  BitDifWord - Bit-wise and one word array with the not of another.
  //
  //
  //  This procedure bit-wise ands 'bitLength' words into 'bitsOut'
  //  with the not of words from 'bitsIn'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitDifWord (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of words.
  //
  //    bitsOut : pointer
  //      The address of the output array of words.
  //
  //    bitLength : cardinal
  //      The number of words to process.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array  anded with  the not  of the  'bitsIn'
  //      array.
  //




  procedure BitXor
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitXor name 'BitLib_BitXor';

  //*
  //  BitXor - Bit-wise XOR two byte arrays.
  //
  //
  //  This procedure bit-wise XORs  'bitLength' bytes from 'bitsIn'
  //  into bytes in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitXor (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of bytes.
  //
  //    bitsOut : pointer
  //      The address of the output array of bytes.
  //
  //    bitLength : cardinal
  //      The number of bytes to XOR.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array XORed with the 'bitsIn' array.
  //




  procedure BitXorWord
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitXorWord name 'BitLib_BitXorWord';

  //*
  //  BitXorWord - Bit-wise XOR two word arrays.
  //
  //
  //  This procedure bit-wise XORs  'bitLength' words from 'bitsIn'
  //  into words in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitXorWord (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of words.
  //
  //    bitsOut : pointer
  //      The address of the output array of words.
  //
  //    bitLength : cardinal
  //      The number of words to XOR.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array XORed with the 'bitsIn' array.
  //




  procedure BitNot
             (const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitNot name 'BitLib_BitNot';

  //*
  //  BitNot - Bit-wise not a byte array.
  //
  //
  //  This procedure bit-wise nots 'bitLength' bytes in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitNot (bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsOut : pointer
  //      The address of the output array of bytes.
  //
  //    bitLength : cardinal
  //      The number of bytes to not.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array noted.
  //




  procedure BitNotWord
             (const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitNotWord name 'BitLib_BitNotWord';

  //*
  //  BitNotWord - Bit-wise not a word array.
  //
  //
  //  This procedure bit-wise nots 'bitLength' words in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitNotWord (bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsOut : pointer
  //      The address of the output array of words.
  //
  //    bitLength : cardinal
  //      The number of words to not.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array noted.
  //




  function BitKnt
             (const bitsIn    : pointer;
              const bitLength : cardinal) : cardinal; stdcall;

  exports BitKnt name 'BitLib_BitKnt';

  //*
  //  BitKnt - Count the set bits in a byte array.
  //
  //
  //  This procedure  counts the set  bits in 'bitLength'  bytes of
  //  'bitsIn'.
  //
  //  CALLING SEQUENCE -
  //
  //    count := BitKnt (bitsIn, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of bytes.
  //
  //    bitLength : cardinal
  //      The number of bytes to count.
  //
  //  EXIT -
  //
  //    count : cardinal
  //      The number of bits set in the array.
  //




  function BitKntWord
             (const bitsIn    : pointer;
              const bitLength : cardinal) : cardinal; stdcall;

  exports BitKntWord name 'BitLib_BitKntWord';

  //*
  //  BitKntWord - Count the set bits in a word array.
  //
  //
  //  This procedure  counts the set  bits in 'bitLength'  words of
  //  'bitsIn'.
  //
  //  CALLING SEQUENCE -
  //
  //    count := BitKntWord (bitsIn, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of words.
  //
  //    bitLength : cardinal
  //      The number of words to count.
  //
  //  EXIT -
  //
  //    count : cardinal
  //      The number of bits set in the array.
  //




  function ByteAnd
             (const char1 : char;
              const char2 : char) : char; stdcall;

  exports ByteAnd name 'BitLib_ByteAnd';

  //*
  //  ByteAnd - and two bytes together returning the result.
  //
  //
  //  This procedure bit-wise ands two bytes and returns the result.
  //
  //  CALLING SEQUENCE -
  //
  //    andedByte := ByteAnd (char1, char2);
  //
  //  ENTRY -
  //
  //    char1, char2 : char
  //      The two bytes to be anded.
  //
  //  EXIT -
  //
  //    andedByte : char
  //      The result of anding the two bytes.
  //




  function WordAnd
             (const word1 : ModSys.BIT16;
              const word2 : ModSys.BIT16) : ModSys.BIT16; stdcall;

  exports WordAnd name 'BitLib_WordAnd';

  //*
  //  WordAnd - and two words together returning the result.
  //
  //
  //  This procedure bit-wise ands two words and returns the result.
  //
  //  CALLING SEQUENCE -
  //
  //    andedWord := WordAnd (word1, word2);
  //
  //  ENTRY -
  //
  //    char1, char2 : ModSys.Bit16
  //      The two words to be anded.
  //
  //  EXIT -
  //
  //    andedWord : ModSys.Bit16
  //      The result of anding the two words.
  //




  procedure ShiftLeftOffArray
             (const TheSet   : pointer;
              const setBytes : cardinal;
              const bits     : cardinal); stdcall;

  exports ShiftLeftOffArray name 'BitLib_ShiftLeftOffArray';

  //*
  //  ShiftLeftOffArray - Shift array of bits left without wrap around.
  //
  //
  //  This procedure left shifts an array of bytes the specified number
  //  of bits. In a left shift the  highest order bits are shifted off
  //  first. The right (lower order) bits are set to zero (0).
  //
  //  CALLING SEQUENCE -
  //
  //    ShiftLeftOffArray (TheSet, setBytes, bits);
  //
  //  ENTRY -
  //
  //    TheSet : pointer
  //      The address of the array of bytes containing the bits to
  //      be shifted.
  //
  //    setBytes : cardinal
  //      The number of bytes in the array to be shifted.
  //
  //    bits : cardinal
  //      The number of bits to shift off.
  //
  //  EXIT -
  //
  //    TheSet : pointer
  //      The original array with bits shifted.
  //




  procedure ShiftRightOffArray
             (const TheSet   : pointer;
              const setBytes : cardinal;
              const bits     : cardinal); stdcall;

  exports ShiftRightOffArray name 'BitLib_ShiftRightOffArray';

  //*
  //  ShiftRightOffArray - Shift array of bits right without wrap around.
  //
  //
  //  This procedure right shifts an array of bytes the specified number
  //  of bits. In a right shift the  lowest order bits are shifted off
  //  first. The left (higher order) bits are set to zero (0).
  //
  //  CALLING SEQUENCE -
  //
  //    ShiftRightOffArray (TheSet, setBytes, bits);
  //
  //  ENTRY -
  //
  //    TheSet : pointer
  //      The address of the array of bytes containing the bits to
  //      be shifted.
  //
  //    setBytes : cardinal
  //      The number of bytes in the array to be shifted.
  //
  //    bits : cardinal
  //      The number of bits to shift off.
  //
  //  EXIT -
  //
  //    TheSet : pointer
  //      The original array with bits shifted.
  //




  procedure BitAndDWord
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitAndDWord name 'BitLib_BitAndDWord';

  //*
  //  BitAndDWord - Bit-wise and two dword arrays.
  //
  //
  //  This procedure bit-wise ands  'bitLength' dwords from 'bitsIn'
  //  into dwords in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitAndDWord (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of dwords.
  //
  //    bitsOut : pointer
  //      The address of the output array of dwords.
  //
  //    bitLength : cardinal
  //      The number of dwords to and.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array anded with the 'bitsIn' array.
  //




  procedure BitOrDWord
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitOrDWord name 'BitLib_BitOrDWord';

  //*
  //  BitOrDWord - Bit-wise OR two dword arrays.
  //
  //
  //  This procedure  bit-wise ORs 'bitLength'  dwords from 'bitsIn'
  //  into dwords in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitOrDWord (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of dwords.
  //
  //    bitsOut : pointer
  //      The address of the output array of dwords.
  //
  //    bitLength : cardinal
  //      The number of dwords to OR.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array ORed with the 'bitsIn' array.
  //




  procedure BitDifDWord
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitDifDWord name 'BitLib_BitDifDWord';

  //*
  //  BitDifDWord - Bit-wise and one dword array with the not of another.
  //
  //
  //  This procedure bit-wise ands 'bitLength' dwords into 'bitsOut'
  //  with the not of dwords from 'bitsIn'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitDifDWord (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of dwords.
  //
  //    bitsOut : pointer
  //      The address of the output array of dwords.
  //
  //    bitLength : cardinal
  //      The number of dwords to process.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array  anded with  the not  of the  'bitsIn'
  //      array.
  //




  procedure BitXorDWord
             (const bitsIn    : pointer;
              const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitXorDWord name 'BitLib_BitXorDWord';

  //*
  //  BitXorDWord - Bit-wise XOR two dword arrays.
  //
  //
  //  This procedure bit-wise XORs  'bitLength' dwords from 'bitsIn'
  //  into dwords in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitXorDWord (bitsIn, bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of dwords.
  //
  //    bitsOut : pointer
  //      The address of the output array of dwords.
  //
  //    bitLength : cardinal
  //      The number of dwords to XOR.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array XORed with the 'bitsIn' array.
  //




  procedure BitNotDWord
             (const bitsOut   : pointer;
              const bitLength : cardinal); stdcall;

  exports BitNotDWord name 'BitLib_BitNotDWord';

  //*
  //  BitNotDWord - Bit-wise not a dword array.
  //
  //
  //  This procedure bit-wise nots 'bitLength' dwords in 'bitsOut'.
  //
  //  CALLING SEQUENCE -
  //
  //    BitNotDWord (bitsOut, bitLength);
  //
  //  ENTRY -
  //
  //    bitsOut : pointer
  //      The address of the output array of dwords.
  //
  //    bitLength : cardinal
  //      The number of dwords to not.
  //
  //  EXIT -
  //
  //    bitsOut : pointer
  //      The array noted.
  //




  function BitKntDWord
             (const bitsIn    : pointer;
              const bitLength : cardinal) : cardinal; stdcall;

  exports BitKntDWord name 'BitLib_BitKntDWord';

  //*
  //  BitKntDWord - Count the set bits in a dword array.
  //
  //
  //  This procedure  counts the set  bits in 'bitLength'  dwords of
  //  'bitsIn'.
  //
  //  CALLING SEQUENCE -
  //
  //    count := BitKntDWord (bitsIn, bitLength);
  //
  //  ENTRY -
  //
  //    bitsIn : pointer
  //      The address of the input array of dwords.
  //
  //    bitLength : cardinal
  //      The number of dwords to count.
  //
  //  EXIT -
  //
  //    count : cardinal
  //      The number of bits set in the array.
  //




  function DWordAnd
             (const dword1 : cardinal;
              const dword2 : cardinal) : cardinal; stdcall;

  exports DWordAnd name 'BitLib_DWordAnd';

  //*
  //  DWordAnd - and two dwords together returning the result.
  //
  //
  //  This procedure bit-wise ands two dwords and returns the result.
  //
  //  CALLING SEQUENCE -
  //
  //    andedDWord := DWordAnd (dword1, dword2);
  //
  //  ENTRY -
  //
  //    dword1, dword2 : cardinal
  //      The two dwords to be anded.
  //
  //  EXIT -
  //
  //    andedWord : cardinal
  //      The result of anding the two dwords.
  //




Send mail to   warren.merrill@inl.gov with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance