User manual

Tutorial: Handel-C and PSL basics
while (1)
{
par
{
XPos = MouseX;
YPos = MouseY;
if (MouseL == 1)
BoxColour++;
else
delay;
if (MouseR == 1)
BoxColour = Red;
else
delay;
}
}
The code for updating the box position and colour can not go in the same
while(1) loop as the code
which reads the switches, as it needs to execute every cycle, and the switch code includes calls to
Sleep(). Instead, separate while(1) loops are run in parallel within the RunOutput macro, allowing
each to take different numbers of cycles simultaneously.
www.celoxica.com
Page 69