Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jweinst1/oblivionjs
A Typescript virtual interpreter.
https://github.com/jweinst1/oblivionjs
Last synced: 5 days ago
JSON representation
A Typescript virtual interpreter.
- Host: GitHub
- URL: https://github.com/jweinst1/oblivionjs
- Owner: jweinst1
- License: mit
- Created: 2015-12-31T23:19:38.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-04T05:23:40.000Z (almost 9 years ago)
- Last Synced: 2023-03-02T15:32:41.571Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://jweinst1.gitbooks.io/the-oblivion-language/content/
- Size: 177 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#OblivionJS
OblivionJS is a virtual machine written in TypeScript. The VM is primarily being developed for the [Oblivion Language](https://jweinst1.gitbooks.io/the-oblivion-language/content/). However, the VM can be used for the implementation of other languages. OblivionJS uses simple, straight forward sets of opcodes, as opposed to non-readable sets of bytecodes. This way, compilers can output an ASCII string containing the opcodes, instead of containers of bytes.
###Op Code Format
The Op codes for OblivionJS follow a three character format, followed by a `->` seperator, and then the corrseponding value associated with the code. Each opcode is sepereate by a white space. Here are the basic arithmetic codes:
```
int........creates an integer
add........increments the integer by a number
sub........decrements the integer by a number
mul........multiplies the integer by a number
div........divides the integer by a number
rem........sets the integer equal to the modulo remainder by a number
```So here is an example:
```
int->4 add->3 mul->2This assembles the integer 14.
```