Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter FiveGeneral Functions (continued)

5.22.4 Binary Memory Functions

A series of functions are provided to access sections of buffers (memory) and compare data. This is useful for pattern matching and adjusting binary information.

For various contiguous arrays, such as a char array, individual sections memory can be accessed using array subscripts. However, this can be very inefficient and slow. The routines described in this section allow for easy access to a variable’s memory without the use subscripts, effectively treating the information as a block of raw binary information.

Functions:

BinaryCompare — Compares two variables (or literals) as binary memory.

BinaryCompareNoCase — Compares two variables (or literals) as binary characters without regard to case.

BinaryCopySegment — Copies data from a source segment of data and places it into a target buffer using optional specified position and number of bytes.

BinaryPutSegment — Puts a source segment of binary data into a target buffer at an optional specified position for an optional specified number of bytes.

BinaryReadRecord — Reads a series of variables from a specified source.

BinaryScan — Scans a segment of binary data for a specific pattern.

BinaryWriteRecord — Writes a series of variables to a specified target.

See also:

Get16Word — Gets a 16-bit word from a string or char buffer by offset with optional swap.

Get32Word — Gets a 32-bit dword from a string or char buffer by offset with optional swap.

Get64Word — Gets a 64-bit qword from a string or char buffer by offset with optional swap.

Get32Float — Gets a 32-bit float from a string or char buffer by offset. Conversion is to 64-bit float.

Get64Float — Gets a 64-bit float from a string or char buffer by offset.

Put16Word — Sets 16-bit word into a buffer at a specified position.

Put32Word — Sets 32-bit dword into a buffer at a specified position.

Put64Word — Sets 64-bit qword into a buffer at a specified position.

Put32Float — Sets 32-bit float into a buffer at a specified position.

Put64Float — Sets 64-bit float into a buffer at a specified position.