No description
Find a file
2022-10-22 00:14:45 +02:00
js funcs, import 2022-10-21 23:57:06 +02:00
lisp funcs, import 2022-10-21 23:57:06 +02:00
.gitignore funcs, import 2022-10-21 23:57:06 +02:00
main.js funcs, import 2022-10-21 23:57:06 +02:00
package-lock.json funcs, import 2022-10-21 23:57:06 +02:00
package.json funcs, import 2022-10-21 23:57:06 +02:00
Readme.md fix 2022-10-22 00:14:45 +02:00

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)