No description
js | ||
lisp | ||
.gitignore | ||
main.js | ||
package-lock.json | ||
package.json | ||
Readme.md |
Lisp to MMIX Commpiler
This is a simple Commpiler vor lisp to mmix. It uses a custom lisp flavour.
Features
Import
#import math ;import default library
#import "some.lisp" ;import your own lisp
Variables
(defvar [name]:[type] [value])
(set [name] [value])
Math
(+ [value] [value] ...)
(- [value] [value] ...)
(* [value] [value] ...)
(/ [value] [value] ...)
(mod [value] [value])
(round [value])
(sqrt [value])
(uint [value])
(int [value])
(float [value])
Bools and Comparison
(< [value] [value])
(<= [value] [value])
(= [value] [value])
(>= [value] [value])
(> [value] [value])
(! [value])
(!! [value])
Branches, Loops, Funktions
(progn [command] ...)
(if [condition] [command])
(if [condition] [command] [command]) ; then and else
(defun [name]:[type]
[command]
...
(return [value])
)
Rest
(assm [string])
(printRaw [addr])
(addr [variable])
(exit)