LongWord
Module with operations on LONGWORD (double machine word 64bit) for low-level routines
Procedures
LSR
PROCEDURE LSR* (x : LONGWORD; n : INTEGER): LONGWORD;
Combine
Work around 32bit limit of hex constants
PROCEDURE Combine*(high, low : WORD): LONGWORD;
Split
Work around 32bit limit of hex constants
PROCEDURE Split*(x : LONGWORD; VAR high, low : WORD);
Cast
Bit cast src to dst
PROCEDURE Cast*(VAR dst : ARRAY OF BYTE; src- : ARRAY OF BYTE);
CastConst
Bit cast src value to dst
PROCEDURE CastConst*(VAR dst : ARRAY OF BYTE; src : LONGWORD);
PopCnt
1 Bit count operation
PROCEDURE PopCnt*(x : LONGWORD): WORD;
LZCnt
Leading 0 bit count operation
PROCEDURE LZCnt*(x : LONGWORD): WORD;
Random
Next psuedo random number : 0 -> range or 2^64 (XorShift)
PROCEDURE Random* (range := 0 : LONGWORD): LONGWORD;
FromString
Convert string str to LONGWORD with optional base (10 by default) and optional start and length into str.
Return TRUE if success.
PROCEDURE FromString* (VAR result : LONGWORD; str- : ARRAY OF CHAR; base := 10 : INTEGER; start := 0 : LONGINT ; length := -1 : LONGINT): BOOLEAN;