Before a high level programming language compiler is developed for OVM, an assembly language is needed for programmers to start developing Ω smart contracts.
Syntax for Ω assembly language is simple:
- 1. Anything between a semicolom (;) and end of line are comments and will be removed by assembler.
- 2. A define statement defines a macro, syntax for a define statement is:
define {NAME} {MEANING}
{NAME} and {MEANING} could be any string without space in it. If {MEANING} is a period (,), it represents current instruction number. Anything in the code matching {NAME} would be replaced by {MEANING}, unless {NAME} is preceeded by a period (.).
- 3. A .{NAME} will be replaced by difference of the instruction number defined by {NAME} and the present instruction number.
- 4. abi("{NAME}") is an assembler function which will do hash on NAME and return the lower 4 bytes as a 32-bit number.
- 5. The assembly language uses mnemonics for op codes.
That's all.