Skip to content

devsnek/tis100.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TIS-100 Implementation in JavaScript

import { Node, TIS } from 'tis100.js';

const left = new Node(`
ADD 1
MOV ACC, RIGHT
`);

const right = new Node(`
MOV LEFT, ACC
`);

const tis = new TIS([
  [left, right],
]);

while (true) {
  const allBlocked = tis.step();
  console.log(right.ACC); // 1, 2, 3, ...
}

Check out basic.js for an more complex example.

async.js contains the first prototype, which used promises instead of instruction continuations.

About

TIS-100 Implementation in JavaScript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published