Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nirvanasupermind/termite
Termite is a virtual machine for a ternary-based RISC CPU architecture.
https://github.com/nirvanasupermind/termite
assembly-language programming-language ternary ternary-computer virtual-machine
Last synced: 9 days ago
JSON representation
Termite is a virtual machine for a ternary-based RISC CPU architecture.
- Host: GitHub
- URL: https://github.com/nirvanasupermind/termite
- Owner: nirvanasupermind
- License: mit
- Created: 2022-05-26T06:24:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-30T09:30:46.000Z (6 months ago)
- Last Synced: 2024-07-02T00:55:02.287Z (6 months ago)
- Topics: assembly-language, programming-language, ternary, ternary-computer, virtual-machine
- Language: C++
- Homepage:
- Size: 2.48 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Termite icon](./icon.png)
# Termite
Version 1.1.1Termite is an emulator for a 16-trit balanced [ternary](https://en.wikipedia.org/wiki/Ternary_numeral_system) (base 3) computer written in C++11, with a clock rate of approximately 450 kHz. Termite uses trytes of 8 trits and big-endian words of 16 trits. Addresses are 1 word long, so Termite can address 3^16 = 43046721 trytes of memory. Some example files you can run with `teremu` are provided in the examples directory.
[Documentation for Termite](documentation.md)
## Included command-line programs
These can be built using `make` (Mac/Linux only, and may require root permission).If you need to compile from source, navigate to where Termite is installed and use these commands on Mac/Linux:
```
clang++ src/core/*.cpp src/teremu/*.cpp -o -std=c++11
clang++ src/core/*.cpp src/terasm/*.cpp -o -std=c++11
```
On Windows:
```
clang++ src\core\*.cpp src\teremu\*.cpp -o -std=c++11
clang++ src\core\*.cpp src\terasm\*.cpp -o -std=c++11
```(If you are using another C++ compiler, replace `clang++` with it.)
* `teremu`: For running Termite machine code executable files. -v option can be added for verbose mode, where the values of all registers are printed after each instruction runs. File format for Termite executables is .texe.
* `terasm`: For transpiling Termite assembly files into executable files.
## Future ideas
* High-level C-like programming language which compiles into Termite assembly.
* Semigraphical or graphical display instead of using the command line for the output.## Changelog
* 1.1.1 (2023-12-26): Documentation for assembly and minor bugfix in `src/teremu/main.cpp`
* 1.1 (2023-12-24): `terasm` assembler, added instructions like `xor` and `xori`
* 1.0 (2023-07-09): Initial release, no assembler yet