What the `CALL` instruction does is up to implementations. The JIT can decide what to do with the register s0 and the number c. It could provide mechanisms to perform I/O on a true filesystem, on an emulated filesystem, or it could do something else entirely, i.e, something web related.
Binary files start with two 16 bit numbers, a constant and a length N, followed by a list of
length N of pairs 16 bit numbers. This is the header of the file.
The initial constant is currently unused and unimportant. In this draft-toy-spec, the initial constant
is always 39979.
The first number is an offset, and the second number is a size N in bytes.
The offset points at a null-terminated UTF-8 (yes.) string, located offset\*16 bits to the right after the end of the header in the binary file, followed by arbitrary binary content of size N\*16 bits.
The utf-8 string cannot contain the null character anywhere, as that will be used as terminator.
This represents a "symbols table" of the binary file, where functions and data can be stored.
There must exist a symbol named "main", and it must point to a function: this will be the entrypoint to our program.
When loading a binary program, all the code in the binary file is placed at the start of our memory, followed by the data sections, in the order it appeared.
The "text" sections (or code) are put in the order they appeared on the binary file, with the only exception of the "main" section, witch goes at the start of the file.