Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
What you are about to read/follow will not have any useful value or improve your life in any way. It may eat your laptop. End Disclaimer.
But hey, you're not here for useful stuff. Let's do a thing.
First, we need to build and install the tool chain. For this, you will need the following:
- Linux or MacOS, because Unix is best.
- A relatively recent version of nodejs and npm. Anything more recent than 8.0 should be fine.
- The dotnet core sdk. Get it here: https://dotnet.microsoft.com/download
- Some make program. On ubuntu, install build-essentials. On mac, you can probably get it by installing xcode and friends.
Got the things? Good. Let's install the toolchain.
- First clone the repo:
git clone firstname.lastname@example.org:jpfeiffer16/Synacor.git
- cd into the root of the repo and run
npm install -g .That will install the assembler, disassembler, and vm.
- cd into the compiler dir with
- Install the compiler with
sudo make install
- Now you should have the
If you have issues with any of these steps, just open an issue and I'll check it out.
Now that is done we can make a simple program and run it.
Now create a file called something like
Let's start with this:
#include "stdlib.bc" println("Hello, world");
Now compile and run it with:
cat hello.bc | syncomp - | syn-asm - > hello.bin then run
syn-vm -b hello.bin
You should get
Hello, world greeting you on your terminal.