https://github.com/kt3k/deno_td4
TD4 emulator in deno (TypeScript)
https://github.com/kt3k/deno_td4
deno td4
Last synced: 2 months ago
JSON representation
TD4 emulator in deno (TypeScript)
- Host: GitHub
- URL: https://github.com/kt3k/deno_td4
- Owner: kt3k
- License: mit
- Created: 2019-06-21T14:34:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-21T17:16:46.000Z (about 7 years ago)
- Last Synced: 2025-03-31T02:34:50.949Z (about 1 year ago)
- Topics: deno, td4
- Language: TypeScript
- Size: 31.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deno_td4
> TD4 emulator written in [Deno][] (TypeScript)
[](https://travis-ci.org/kt3k/deno_td4)
# Run emulator
The module exports `run` function, which runs the TD4 program with the given input. `run` takes two arguments `program: number[]` and `input: number`. `run` returns the array of output of the program and input.
```ts
import { run } from "https://raw.githubusercontent.com/kt3k/deno_td4/master/mod.ts";
console.log(run([0x20, 0x08, 0xe4, 0x05, 0x01, 0x40, 0x90], 0x8))
// This outputs [ 6 ], which is the result of the above program and input
```
# License
MIT
[deno]: https://deno.land/