From bc759b6e6b9d33805c6fc1c34f206642bea18bd1 Mon Sep 17 00:00:00 2001 From: m3rashid Date: Fri, 9 Feb 2024 23:12:27 +0530 Subject: [PATCH] update --- README.md | 26 ++++++++++++++++++++++++++ {files => examples}/1.lol | 1 + {files => examples}/2.lol | 0 {files => examples}/3.lol | 0 {files => examples}/4.lol | 0 5 files changed, 27 insertions(+) rename {files => examples}/1.lol (96%) rename {files => examples}/2.lol (100%) rename {files => examples}/3.lol (100%) rename {files => examples}/4.lol (100%) diff --git a/README.md b/README.md index ae877d1..5bf1774 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,29 @@ ## Lol Lang Lol lang is an assembly style interpreted language with its syntax inspired from assembly + +- Currently works only with integers +- supports the following features +- Refer the `examples` folder for code examples + +| Feature | Description | +| --------- | ------------------------------------------------- | +| PUSH | Push to the stack | +| POP | Pop from the stack | +| ADD | add last 2 values from the stack | +| SUB | subtracts last 2 values from the stack | +| PRINT | prints things to the screen | +| READ | read input from the user | +| JUMP.EQ.0 | jump if top of the stack is zero | +| JUMP.GT.0 | jump if the top of the stack is greater than zero | +| HALT | marks the end of the program | + +## Usage + +```bash +# build the project +make build + +# run the project +bin/lol .lol +``` diff --git a/files/1.lol b/examples/1.lol similarity index 96% rename from files/1.lol rename to examples/1.lol index c251df5..8e6ed7c 100644 --- a/files/1.lol +++ b/examples/1.lol @@ -1,2 +1,3 @@ PRINT "hello world" HALT + diff --git a/files/2.lol b/examples/2.lol similarity index 100% rename from files/2.lol rename to examples/2.lol diff --git a/files/3.lol b/examples/3.lol similarity index 100% rename from files/3.lol rename to examples/3.lol diff --git a/files/4.lol b/examples/4.lol similarity index 100% rename from files/4.lol rename to examples/4.lol