Orc Program SyntaxOrc Program — Description of the Orc program syntax |
Orc Program
An orc program is an UTF-8 file containing the source read by the Orc-compiler. Each program consists of several blocks. Each block contains a directives and opcodes.
.function
.function <function-name>
Starts a new function. Takes one arg which is the function name.
.source
.source <size> <var-name> [<type-name>]
Input data array parameter for functions. Arguments denote size of the items in the array (1,2,4,8), name of the variable and optional name of the type. Only reads are allowed.
.dest
.dest <size> <var-name> [<type-name>]
Output data array parameter for functions. Arguments denote size of the items in the array (1,2,4,8), name of the variable and optional name of the type. This directive can also be used for in/out array parameters.
.accumulator
.accumulator <size> <var-name> [<type-name>]
Output value parameter for functions. Arguments denote size of the variable (1,2,4,8), name of the variable and optional name of the type.
.param
.param <size> <var-name> [<type-name>]
Parameter for functions. Arguments denote size of the variable (1,2,4,8), name of the variable and optional name of the type.
This directive has variants named: .longparam, .floatparam and .doubleparam.
.const
.const <size> <var-name>
Constant for functions. Arguments denote size of the constant (1,2,4,8) and the name.