SPLat Logo

RecallS ss+,bb* [D>=12]

NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

RecallS ss+,bb* [D>=12]

(T=Z; Z=Y; Y=X;) X = bb & (1 << ss)

Push semaphore ss to X. The semaphore base address bb is optional; if omitted it is taken to be 0. The value placed in X will be the value in the byte containing the semaphore with all other bits set to zero. For example, if the semaphore is in bit position 4 in the byte, and it is set, then after the RecallS instruction X will contain %00010000.

Because SPLat interprets any non-zero value in X as True, this behaviour will give the correct response to a subsequent True/False test or simple Boolean operation. It may however give unpredictable results if a subsequent operation uses a masked (bit-wise) boolean instruction like AndM, i.e. operates on individual bits. If this is a risk then you can "normalize" the result by doing two NOT operations on it.

For more details see the semaphore tutorial.

This instruction can be indexed by adding an 'i' in front of the instruction keyword. Indexing adds the contents of the index register I to the base address bb. That means it modifies the byte base address, not the bit address.

+ From dialect 16 the address argument will be jndexed when executed inside a MultiTrack task and will be indexed if the instruction is preceded by the IasJ: precode. jndexing of semaphore addresses adds the contents of J to the bit address ss, not to the byte address bb. See Multi-channel MultiTrack: Semaphore addressing with J and I

The following is illegal: IasJ:iRecallS

Dialect restriction: Available only in boards with dialect 12 or greater.