Registers

Standard Functions

These are the standard functions for managing 8- to 32-bit registers:

FunctionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. Description

rol

Rotate bits of a register to the left.

ror

Rotate bits of a register to the right.

shl

Shift bits of a register to the left.

shr

Shift bits of a register to the right.

Advanced Function

This is the advanced function for register manipulation:

Function Description

MBshift

Multi-byte shift / rotate.

Bit-to-Bit Functions

These functions enable bit-to-bit operations on a 8- to 32-bit integers:

Function Description

and_mask

Performs a bit-to-bit Boolean AND between two integer values.

not_mask

Performs a bit-to-bit Boolean negation of an integer value.

or_mask

Performs a bit-to-bit Boolean OR between two integer values.

xor_mask

Performs a bit to bit exclusive OR between two integer values.

Pack / Unpack Functions

These functions enable pack / unpack 8-, 16-, and 32-bit registers:

Function Description

HiByte

Get the highest byte of a word.

HiWord

Get the highest word of a double word.

LoByte

Get the lowest byte of a word.

LoWord

Get the lowest word of a double word.

MakeDWord

Builds a double word as the concatenation of two words.

MakeWord

Builds a word as the concatenation of two bytes.

PACK8

Pack bits in a byte.

UNPACK8

Extract bits from a byte.

Bit Access

These functions provide bit access in 8- to 32-bit integers:

Function Description
SetBit

Set a bit in an integer register.

TestBit

Test a bit of an integer register.