defSEM Directive
The defSEM
directive directs SPLat/PC to assign a value to a label and reserve single bit of RAM to hold the semaphore (optionally multiple semaphores) associated with that label. It is part of the Automatic RAM Allocation scheme introduced in SPLat/PC V7.15.2 (May2005).
Syntax:
Label defSEM {Value}
Label
is any properly formed label. Value
is an optional numeric constant. If not used Value
defaults to 1. Typically you would specify Value
if you intend to access an array of data using jndexed addressing.
SPLat/PC will allocate one byte of RAM for every 8 semaphores.
An error will be raised if SPLat/PC is unable to find enough free RAM.