Indexed by TopGit from live GitHub metadata: gto76/comp-cpp has 343 stars, written primarily in C++. Comp Mark I – Simple 4-bit virtual computer
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Execution stops when program reaches last address (15).
Whatever gets written to the last address is sent to the printer.
When reading from the last address (15), we get a random byte value.
CPU has one 8 bit register.
Instruction set
READ ---- - Copies the value at the specified address into register.
WRITE ---* - Copies value of the register to the specified address.
ADD --*- - Adds value at the specified address to the value of the register, and writes result to the register. If the result is bigger than the maximum possible value (255 = ********) then 255 gets written.
SUBTRACT --** - Subtracts value at the speicfied address from the value of the register, and writes result to the register. If the result is smaller than 0 then 0 gets written.
JUMP -*-- - Changes the value of the program counter to the specified address, meaning that in the next cycle execution will continue at that address.
IF MAX -*-* - Jumps to the specified address if register has value 255 = ********.
IF MIN -**- - Jumps to the specified address if register has value 0 = --------.
SHIFT R -*** - Moves every bit of the register one spot to the right. This way rightmost bit gets lost, and a leftmost becomes '-'. This is the only instruction that doesn't use the address part, making the last four bits irrelevant.
Any instruction that is not defined above is interpreted as READ ---- instruction.
How to run on…
Windows
Install Tiny Core Linux on VirtualBox using this instructions.
Run the UNIX commands.
UNIX
$ git clone https://github.com/gto76/comp-cpp.git
$ cd comp-cpp
$ ./run
Other versions
Mark II, model with separate address space for code and data, and with more instructions. Programs can be saved and loaded and it can run without the interface (instead of a printer, it then uses stdout). Also input can be piped in.
The most recent commit recorded on gto76/comp-cpp was 2.7 years ago, based on the GitHub push timestamp. The repository has 32 forks — one of the better signals of community interest.
How many stars does gto76/comp-cpp have?
gto76/comp-cpp has 343 GitHub stars — refresh the page for the live number, or check github.com/gto76/comp-cpp. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is gto76/comp-cpp written in?
gto76/comp-cpp is written primarily in C++. GitHub's language field is based on the largest share of bytes in the default branch.
What topics is gto76/comp-cpp associated with?
GitHub's repository topics for gto76/comp-cpp: "educational-software", "virtual-machine". TopGit's editorial category is open-source.
Where do I read more about gto76/comp-cpp?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/gto76/comp-cpp is the definitive source.
Read full README in the tab above.
Want a second opinion on comp-cpp?
Ask an AI that can read this page — one click and you get its take on comp-cpp.