{"id":21194627,"url":"https://github.com/omrawaley/txt-8","last_synced_at":"2026-05-19T07:09:28.549Z","repository":{"id":262916262,"uuid":"888768480","full_name":"omrawaley/txt-8","owner":"omrawaley","description":"TXT-8 is a simple 8-bit text-based virtual machine with the intent of education on virtualization.","archived":false,"fork":false,"pushed_at":"2024-12-24T15:02:26.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T08:51:48.135Z","etag":null,"topics":["c","command-line","computer","computer-architecture","cpp","emulation","emulator","instruction-set-architecture","instruction-set-emulation","interpreter","text-based","virtual-machine","virtualization"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omrawaley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-15T01:10:18.000Z","updated_at":"2024-12-24T15:02:29.000Z","dependencies_parsed_at":"2024-11-15T02:20:02.872Z","dependency_job_id":"b1714110-5345-46d1-95a2-78fe251da1ea","html_url":"https://github.com/omrawaley/txt-8","commit_stats":null,"previous_names":["omrawaley/txt-8"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/omrawaley/txt-8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrawaley%2Ftxt-8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrawaley%2Ftxt-8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrawaley%2Ftxt-8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrawaley%2Ftxt-8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omrawaley","download_url":"https://codeload.github.com/omrawaley/txt-8/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrawaley%2Ftxt-8/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33205664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"online","status_checked_at":"2026-05-19T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","command-line","computer","computer-architecture","cpp","emulation","emulator","instruction-set-architecture","instruction-set-emulation","interpreter","text-based","virtual-machine","virtualization"],"created_at":"2024-11-20T19:23:32.863Z","updated_at":"2026-05-19T07:09:28.527Z","avatar_url":"https://github.com/omrawaley.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# TXT-8 Text-Based Virtual Machine\n\n\u003cpre\u003e\n /$$$$$$$$ /$$   /$$ /$$$$$$$$       /$$$$$$ \n|__  $$__/| $$  / $$|__  $$__/      /$$__  $$\n   | $$   |  $$/ $$/   | $$        | $$  \\ $$\n   | $$    \\  $$$$/    | $$ /$$$$$$|  $$$$$$/\n   | $$     \u003e$$  $$    | $$|______/ \u003e$$__  $$\n   | $$    /$$/\\  $$   | $$        | $$  \\ $$\n   | $$   | $$  \\ $$   | $$        |  $$$$$$/\n   |__/   |__/  |__/   |__/         \\______/ \n\u003c/pre\u003e\n\nThe TXT-8 is a simple 8-bit virtual machine based on the command line. \n\nTXT-8 has a minimal instruction set which demonstrates the fundamental aspects of virtualization.\n\nI originally created TXT-8 to provide digestible substance for my lecture on virtualization for the programming club at my school.\n\n## Specs\nComponents and specifications of TXT-8.\n\n### CPU\n- 8x 8-bit general-purpose registers.\n- 8-level 12-bit address stack. \n- 12-bit stack pointer.\n- 12-bit program counter.\n- 12-bit index register.\n\n### Memory\n- 4096 bytes of memory (4KB).\n- 12-bit addressing.\n\n### Special\n- 8-bit output buffer.\n- 8-bit buffer pointer that points to the end of the buffer.\n\n## Instruction Set\nX: 8-bit register (4-bit operand).\n\nY: 8-bit register (4-bit operand).\n\nADDR: 12-bit address (12-bit operand).\n\n| Opcode | Mnemonic | Operands | Description                                                                    |\n| ------ | -------- | -------- | ------------------------------------------------------------------------------ |\n| 0      | CALL     | ADDR     | Call subroutine                                                                |\n| 1      | RET      | NULL     | Return from subroutine                                                         |\n| 2      | JMP      | ADDR     | Jump to address                                                                |\n| 3      | ADD      | X, Y     | Add X and Y (store in X)                                                       |\n| 4      | SUB      | X, Y     | Subtract Y from X (store in X)                                                 |\n| 5      | AND      | X, Y     | AND X and Y (store in X)                                                       |\n| 6      | OR       | X, Y     | OR X and Y (store in X)                                                        |\n| 7      | XOR      | X, Y     | XOR X and Y (store in X)                                                       |\n| 8      | SHR      | X, Y     | Shift X right by Y (store in X)                                                |\n| 9      | SHL      | X, Y     | Shift X left by Y (store in X)                                                 |\n| A      | LDB      | X        | Load output buffer with value of register X. Y bit low enables ASCII encoding. |\n| B      | LDI      | X, BYTE  | Load immediate value into X                                                    |\n| C      | LDR      | X, Y     | Load value of Y into X                                                         |\n| D      | LDX      | ADRR     | Load index register with address                                               |\n| E      | STR      | X        | Load value of X into memory[index]                                             |\n| F      | PRNT     | NULL     | Print the text buffer and clear its contents                                   |\n\n\n\n## Authors\n\n- [@omrawaley](https://www.github.com/omrawaley)\n\n\n## Installation\n\nA Makefile is provided in the root directory that can be used to build/clean the project.\n\nSimply run `make build` to compile the project.\n## Usage\n\n```\n./bin/txt8 \u003cpath-to-program\u003e\n```\n\nExamples can be found in the `examples` folder.\n\n\n\nYou can make your own programs by manually typing the instructions into a [hex editor](https://hexed.it/). I plan on making an assembler (so you can use ASM rather than manual hexadecimal) for TXT-8 once I finish fleshing out the instruction set.\n\nThe `.t8` extension for programs is not necessary, but I recommend it for clarity.\n## License\n\nTXT-8 - [Apache 2.9](https://apache.org/licenses/LICENSE-2.0)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomrawaley%2Ftxt-8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomrawaley%2Ftxt-8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomrawaley%2Ftxt-8/lists"}