4 Signal flags

4.1 Client-defined signal flags

The client can define any number of signal flags to use. The number of signals MUST be declared explicitly in the client code, and MUST NOT change in stateful or asynchronous execution environments.

In the assembly code, signals may only be referred to by their numerical value. The numeric value of client-defined signals must have numeric value 8 or greater.

4.1.1 Flow control

Signal flags enables the client to control the execution flow as a side-effect of the execution of external code symbols.

Branching is defined using either the CATCH or CROAK instructions.

The client specifies whether or not a set flag should be reset on next yield. If not, it is the responsiblity of the client to reset the flag when necessary.

4.2 Built-in signal flags

For the numeric values of the signals, please refer to the signals appendix.

Flag nameDescriptionLifetimeWriteable?
READINInput is being processed.From first INCMP until: an INCMP match or an invalid input exception is triggered.no
INMATCHInput matched an INCMP instruction.Next instruction.no
TERMINATETerminate execution before the following instruction.Until explicit reseet.no
DIRTYRendered output is available.Until output is processed.no
WAITHalt execution before the following instruction, and yield control to client.Until control is yielded.no
LOADFAILAn unexpected error has occurred during execution of an external code symbol.Next instruction.no
LANGOutput from an external code symbol is a valid language code, and language should be changed accordingly.Next instruction.yes