Function 10 - wait for event.
If the message queue is empty, waits for appearance of the message
in queue. In this state thread does not consume CPU time.
Then reads out the message from queue.
Parameters:
- eax = 10 - function number
Returned value:
Remarks:
- Those events are taken into account only which enter into
a mask set by function 40. By default it is
redraw, key and button events.
- To check, whether there is a message in queue, use function 11.
To wait for no more than given time, use function 23.