From f4895b34bd1f19046741dbc8c8ba126c9737a0a7 Mon Sep 17 00:00:00 2001 From: jusax23 Date: Sat, 22 Oct 2022 00:13:04 +0200 Subject: [PATCH] readme.md --- Readme.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..9983a3c --- /dev/null +++ b/Readme.md @@ -0,0 +1,61 @@ +# Lisp to MMIX Commpiler +This is a simple Commpiler vor lisp to mmix. It uses a custom lisp flavour. + +## Features +### Import +```lisp +#import math ;import default library +#import "some.lisp" ;import your own lisp +``` +### Variables +```lisp +(defvar [name]:[type] [value]) +(set [name] [value]) +``` +### Math +```lisp +(+ [value] [value] ...) +(- [value] [value] ...) +(* [value] [value] ...) +(/ [value] [value] ...) +(mod [value] [value]) +(round [value]) +(sqrt [value]) +(uint [value]) +(int [value]) +(float [value]) +``` +### Bools and Comparison +```lisp +(< [value] [value]) +(<= [value] [value]) +(= [value] [value]) +(>= [value] [value]) +(> [value] [value]) +(! [value]) +(!! [value]) +``` +### Branches, Loops, Funktions +```lisp +(progn [command] ...) + +(if [condition] [command]) +(if [condition] [command] else [command]) + +(defun [name]:[type] + [command] + ... + (return [value]) +) + +``` +### Rest +```lisp +(assm [string]) + +(printRaw [addr]) + +(addr [variable]) + +(exit) +``` \ No newline at end of file