Orc Program Syntax

Orc 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.

.init

Global initialisation for a module.


.function

.function <function-name>

Starts a new function. Takes one arg which is the function name.


.flags

.flags (1d|2d)

Tells wheter arrays are 1 or 2 dimensional. The default is 1d.


.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.


.temp

.temp <size> <var-name>

Local variable for functions. Arguments denote size of the variable (1,2,4,8) and then name.