Toi (programming language): Difference between revisions

Content deleted Content added
m Add nowiki tags to avoid misparsing as HTML
Tag: nowiki added
Bytecode spec: split subsection
Line 129:
Bytecode is arranged in the following order:
 
<nowiki><opcode>, <arg 0>, <arg 1>, <arg 2></nowiki>
 
Where the <opcode> is a single byte denoting which subroutine to call with the
Line 135:
lengths, some having 0 arguments, and others having 3 arguments.
 
'''===== Interpreting Bytecode Instructions''' =====
 
A bytecode instruction is a single-byte opcode, followed by at maximum 3
arguments, which can be in the following forms:
 
* Static (single byte)
* Name (single word)
* Address (depending on runtime state, usually a word)
* Dynamic (size terminated by NULL, followed by (size)*bytes of data)
** i.e. FF FF 00 <nowiki><0xFFFF bytes of data></nowiki>,
** 01 00 <nowiki><0x1 bytes of data></nowiki>,
** 06 00 <nowiki><0x6 bytes of data></nowiki>, etc.
 
Below is the specification of all the instructions with a short description for