The list is defined by Hugo and Nicolas to promote the interchangeability of our VM files generated by our compilers, following the protocols introduced in the courses.
Meanwhile, the list is subject to changes. When adding new functions to the processor, we will append the functions to the end of the list, and increase the minor version number. And for each modification on existing function, we would update a major version number.
Simply pull a request to add your name in the FOLLOWER section to comply with this so-called standard.
Happy coding.
Compatible with prior to 1.2 (inclusive).
0 lit (not available in interpreter mode)
1 str (not available in interpreter mode)
2 fin (not available in interpreter mode)
3 .
4 +
5 -
6 *
7 = (comparison)
8 dup
9 drop
10 swap
11 count
12 type
13 if (not available in interpreter mode)
14 else (not available in interpreter mode)
15 then (not available in interpreter mode, no processor implementation)
16 / (division)
20 && (optional functions from now on)
21 ||
22 !
23 inferior or equal
24 defer
25 recurse (need no processor implementation)
26 '
27 is
28 calculate
29 catenate
30 cr (generate a string of \n to put in stack)
- Plaese give function
then
a postion in VM
- We use a binary file to store the VM array
- The first two elements of VM array are reserved for general usage.
- VM[0] stores the Processor Order version, currently 1.3, so VM[0] = 1003.
- Incompatibility version info would very likely be added to this file in a later time. So it is suggested to check the version in runtime.
- VM[1] stores the entry point of the function.
- VM array is stored in a binary file with each element being casted to type int32_t (on macOS, ubuntu on linux it is has the same effect as int), which is defined in stdint.h
- CAUTION Most of the test result of the binary file configuration turns out good, but test on Windows using gcc compiler can result to error.
- Please issue error reports if such practice doesn't turn out good on your machine.
- Nicolas (joined 3 Dec), current version 1.3
- Hugo