{"id":50445760,"url":"https://github.com/devsimsek/cpsim","last_synced_at":"2026-05-31T21:30:47.153Z","repository":{"id":209218913,"uuid":"723501976","full_name":"devsimsek/cpsim","owner":"devsimsek","description":"Cpu Simulator + Port of assembly, Built with js, asm ported on virtual cpu arch ","archived":false,"fork":false,"pushed_at":"2024-01-10T10:03:40.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-02T04:20:41.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/devsimsek.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}},"created_at":"2023-11-25T21:40:40.000Z","updated_at":"2024-05-02T04:20:41.301Z","dependencies_parsed_at":"2023-11-25T22:38:15.755Z","dependency_job_id":null,"html_url":"https://github.com/devsimsek/cpsim","commit_stats":null,"previous_names":["devsimsek/cpsim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devsimsek/cpsim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsimsek%2Fcpsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsimsek%2Fcpsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsimsek%2Fcpsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsimsek%2Fcpsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsimsek","download_url":"https://codeload.github.com/devsimsek/cpsim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsimsek%2Fcpsim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33750474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"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":[],"created_at":"2026-05-31T21:30:46.338Z","updated_at":"2026-05-31T21:30:47.146Z","avatar_url":"https://github.com/devsimsek.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Assembly CPU Simulator\n*This is a research project. *\nThis project simulates a simple assembly language interpreter for a CPU. It includes an AssemblyLexer for tokenizing assembly code, an AssemblyParser for interpreting tokens and executing CPU instructions, and a CPU simulator (Cpu class) to perform operations based on the parsed instructions.\n\n## Usage\n\n### Requirements\n- Node.js\n\n### Instructions\n1. Clone or download this repository.\n2. Install dependencies using `npm install`.\n3. Run the simulation with `node main.js`.\n\n## Project Structure\n\n- `main.js`: Entry point of the application, demonstrating the usage of the AssemblyLexer, AssemblyParser, and Cpu classes.\n- `asm.js`: Contains the AssemblyLexer and AssemblyParser classes responsible for tokenizing and parsing assembly code.\n- `cpu.js`: Defines the Cpu class responsible for simulating CPU operations based on parsed instructions.\n\n## Getting Started\n\nTo integrate this assembly language interpreter into your project, follow these steps:\n\n1. Import the required classes into your project:\n    ```javascript\n    import { Cpu } from \"./cpu.js\";\n    import { AssemblyLexer, AssemblyParser } from \"./asm.js\";\n    ```\n\n2. Create a new instance of the CPU:\n    ```javascript\n    let cpu = new Cpu();\n    ```\n\n3. Use the AssemblyLexer to tokenize assembly code:\n    ```javascript\n    let lexer = new AssemblyLexer(\"Your assembly code here\");\n    let tokens = lexer.tokenize();\n    ```\n\n4. Create an instance of the AssemblyParser and parse the tokens:\n    ```javascript\n    let parser = new AssemblyParser(tokens, cpu);\n    parser.parse();\n    ```\n\n5. Execute the parsed instructions using the CPU.\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.\n\n![Alt](https://repobeats.axiom.co/api/embed/3c9701bf073a12a281d83dce312ba691ca40d0fb.svg)\n\n## Author\n\n- **devsimsek** - *Metin Şimşek*\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://devsimsek.mit-license.org) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsimsek%2Fcpsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsimsek%2Fcpsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsimsek%2Fcpsim/lists"}