Skip to content

Fantaskink/TIS-100-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TIS-100-Compiler

Introduction

This is a small personal project that implements a modified version of the assembly language from the Zachtronics game TIS-100. Currently, the project only simulates a single Basic Instruction Node, which can print values to the console using the OUT port. TIS-100 instructions are translated to AArch64 instructions, which can be run natively on Apple Silicon architectures using Clang.

Example

The following program prints the numbers 10 to 1 to the console, then terminates.

MOV 10, ACC
START:
 JEZ TERM
 MOV ACC, OUT
 SUB 1
 JMP START
TERM:

Usage

Write your TIS-100 program in the "program.txt" file, then run main.py to compile the program to an "output.s" file. Assemble and run the program using the following commands:

clang -c -o output.o output.s
clang -o output output.o -arch arm64
./output

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published