Skip to content

amsquid/jcompile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jcompile

Basic compiler written in C
Takes a .txc file, converts it into assembly, then converts that file into an executable file.

Installation

Clone the project with:

git clone https://github.com/amsquid/jcompile.git

Compile with:

./build.sh

... and run jcompile with a filename as the first argument:

./jcompile test.txc

Requirements

GCC and NASM

Usage

A txc program has a pointer that points to anywhere on a 512 byte array.
The program has the following instructions:

+   Adding the value at the current array pointer by 1
-   Subtracting the value at the current array pointer by 1
>   Increments the pointer by 1
<   Decrements the pointer by 1
@   Prints the value at the pointer as a character
#   Prints the value at the pointer as a number

License

MIT

About

My attempt at writing a basic compiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published