Skip to main content

Utility Functions

The utility functions encompass any other useful functions not categorized as math or strings.

  • flag(x, index): Read one bit as true or false from a bit flag value x. The index is 0-based. If value is instead an array, flag will reinterpret the array element at index as a boolean.

  • md5(x): Calculates the MD5 hash of string x.

Examples

# The following lines are equivalent

flag(register70, 3)

(register70 & (1 << index)) != 0