{"id":17359172,"url":"https://github.com/meticulouscraftman/supersimplecomputer","last_synced_at":"2025-03-27T15:26:40.392Z","repository":{"id":91376446,"uuid":"294207933","full_name":"meticulousCraftman/SuperSimpleComputer","owner":"meticulousCraftman","description":"A simple hypothetical microprocessor simulator that uses a custom ISA. This project is for learning purposes.","archived":false,"fork":false,"pushed_at":"2020-09-09T20:22:22.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T19:21:57.404Z","etag":null,"topics":["computer-architecture","computer-organization","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meticulousCraftman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-09-09T19:20:27.000Z","updated_at":"2023-03-04T08:11:56.000Z","dependencies_parsed_at":"2023-07-25T01:00:38.127Z","dependency_job_id":null,"html_url":"https://github.com/meticulousCraftman/SuperSimpleComputer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meticulousCraftman%2FSuperSimpleComputer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meticulousCraftman%2FSuperSimpleComputer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meticulousCraftman%2FSuperSimpleComputer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meticulousCraftman%2FSuperSimpleComputer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meticulousCraftman","download_url":"https://codeload.github.com/meticulousCraftman/SuperSimpleComputer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245870359,"owners_count":20686014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["computer-architecture","computer-organization","python3"],"created_at":"2024-10-15T19:08:28.265Z","updated_at":"2025-03-27T15:26:40.363Z","avatar_url":"https://github.com/meticulousCraftman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Super Simple Computer (SSC)\nThis project simulates the Instruction Set of a hypothetical computer.\n\n## How to run this project?\n```\n$ pip3 install -r requirements.txt\n$ python3 runner.py\n```\n\nBasic components that are required:\n  1. Processor -\u003e Executes machine code\n  2. Memory -\u003e Area where data can read from or written to.\n  3. Loader -\u003e Load instructions from file to memory\n  4. Assembler -\u003e Converts program written in text format to binary\n  5. Runner -\u003e Setup different parts of the program and run the processor.\n\n\nCurrently this project only has one processor and that is **SuperSimpleComputer**, here is some more information about the same:\n  - Instruction Size = 32 bit (4 Byte)\n  - Word Size = 32 bit (4 Byte)\n  - Uses Linear Memory\n  - Byte Addressable Memory, each address only stores 1 Byte of information\n\n## Instruction Format\n\nEach instruction is 32 bit long.\n\n```\n|  0000 0000 |     0000 0000     |      0000 0000     |      0000 0000     |\n|--------------------------------------------------------------------------|\n|   OP Code  | Dest. Memory Addr | Operand 1 Mem Addr | Operand 2 Mem Addr |\n```\n\nInstruction opcode table:\n  - No instruction: 0\n  - ADD : 1\n  - SUB : 2\n  - MUL : 3\n  - DIV : 4\n\n## Super Simple Assembly (.ssa files)\nThese are simple text files that contain assembly instructions for Super Simple Computer. These instructions are processed by the assembler to generate machine code that can be executed by the computer.\n\nEach instruction takes 1 line\n\nHere is an example for SSA file (named prg1.ssa)\n```\nadd 3 1 2\nsub 3 1 2\n```\n\nTo generate the machine code for the following assembly code. Do this:\n```\n$ python3 assembler.py prg1.ssa\n```\nThis would generate a file called **output.ssmc** which contains the generated machine code.\n\nThe machine code for the following SSA file would look like this,\n```\n[1, 1, 2, 3, 2, 1, 2, 3]\n```\n\n\n## Filenames\n  - **.ssa** -\u003e Super Simple Assemnbly file. Text file that contains assmebly instructions for Super Simple Computer (SSC).\n  - **.ssmc** -\u003e Super Simple Machine Code. Machine code that would be executed by SSC.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeticulouscraftman%2Fsupersimplecomputer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeticulouscraftman%2Fsupersimplecomputer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeticulouscraftman%2Fsupersimplecomputer/lists"}