Semaphores: The quick and easy way
Automatic RAM Allocation makes the use of semaphores very easy. With auto-allocation, you simply declare semaphores using the defSEM directive, and SPLat/PC takes care of the rest. If you are simply setting, clearing and testing single semaphores, this is as far as you need to go with this tutorial. If you want to do advanced things like simultaneously manipulating several semaphores (bits) in a byte or using indexed addressing you will need to complete the rest of this tutorial.
See also the Basic and Intermediate examples in the Examples section