Knowledge Base

SPLat has logical operations that treat the whole data byte as a single boolean variable (anything nonzero is True) as well as instructions for bit-by-bit boolean operations. Instructions that operate on a bit by bit basis end in ‘M’ (which stands for “mask”).

For example, suppose we have the following binary patterns in X and Y:

X %010101100

Y %001100101

The result of an OR will be %11111111 because both X and Y are non-zero, but the result of an OrM will be %011101101, i.e. will have a 1 wherever there is a 1 in either X or Y but a 0 where there is a 1 in neither.

From dialect 12 we also have semaphore instructions, which provide an easy way to perform single-bit manipulations directly on memory.