{"id":31579072,"url":"https://github.com/auth0x78/compiler85","last_synced_at":"2025-10-05T20:46:16.078Z","repository":{"id":315121886,"uuid":"1058195991","full_name":"Auth0x78/Compiler85","owner":"Auth0x78","description":"A lightweight compiler for Intel 8085 assembly.  ","archived":false,"fork":false,"pushed_at":"2025-10-01T08:16:07.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-01T10:18:21.411Z","etag":null,"topics":["assembler","assembly","code-generator","compiler","educational-project","intel-8085","lexer-parser"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Auth0x78.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-16T18:51:12.000Z","updated_at":"2025-09-16T19:24:38.000Z","dependencies_parsed_at":"2025-09-16T21:54:38.750Z","dependency_job_id":"b91431cc-b758-45ee-bd89-293541fe45c4","html_url":"https://github.com/Auth0x78/Compiler85","commit_stats":null,"previous_names":["auth0x78/compiler85"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Auth0x78/Compiler85","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Auth0x78%2FCompiler85","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Auth0x78%2FCompiler85/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Auth0x78%2FCompiler85/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Auth0x78%2FCompiler85/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Auth0x78","download_url":"https://codeload.github.com/Auth0x78/Compiler85/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Auth0x78%2FCompiler85/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278517932,"owners_count":26000175,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"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":["assembler","assembly","code-generator","compiler","educational-project","intel-8085","lexer-parser"],"created_at":"2025-10-05T20:46:11.163Z","updated_at":"2025-10-05T20:46:16.073Z","avatar_url":"https://github.com/Auth0x78.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Compiler 8085\n\nA simple compiler for Intel 8085 opcodes.  \nIt takes 8085 assembly code as input and produces the corresponding machine code or raw binary as output.  \nDesigned as an educational project to explore compiler phases like lexing, parsing, code generation, and symbol resolution.  \n\n## Build Instructions\n\n```bash\ngit clone https://github.com/Auth0x78/Compiler85.git\ncd Compiler85\nmkdir build \u0026\u0026 cd build\ncmake ..\ncmake --build .\n````\n\n## Usage\n\n### Debug build\n\nIn **Debug mode**, the compiler is interactive — no command line arguments required.\n\n```text\n$\u003e c85\n\nDebug mode: No command line arguments required.\nEnter the filepath of the source file:\nEnter the filepath of the output file:\n\n```\n\nHere’s an updated and polished version of your README section:\n\n---\n\n### Release Build\n\nIn **Release mode**, the compiler is run from the command line with the following syntax:\n\n```bash\n$\u003e c85 \u003csourceFile\u003e \u003coutputFile\u003e [options]\n```\n\n#### Arguments\n\n* `\u003csourceFile\u003e`: Path to the input 8085 assembly (`.asm`) file. Can be relative or absolute.\n* `\u003coutputFile\u003e`: Path where the compiled machine code will be written. Can be relative or absolute.\n* `[options]` (optional flags):\n\n  | Flag           | Description                                                        |\n  | -------------- | ------------------------------------------------------------------ |\n  | `-r`           | Output raw binary (`.bin`) instead of the default Intel HEX format |\n  | `-d`           | Generate a human-readable memory dump of the compiled program      |\n  | `-h`, `--help` | Show this help message                                             |\n\n## 🧪 Adding Test Cases\n\nEach instruction in the Intel 8085 has its own test case .asm file and a golden .dump file.\n- `test_\u003ctest_case_name\u003e.asm` file in `tests/test_input/` → contains the mnemonic  \n- `expect_\u003ctest_case_name\u003e.dump` file in `tests/test_expect/` → contains expected opcode bytes  \n\n### Creating new test case\n\n1. Create a `test_\u003ctest_case_name\u003e.asm` file in `tests/test_input/` with the mnemonic.\n2. Create the matching `expect_\u003ctest_case_name\u003e.dump` file in `tests/test_expect/` with expected hex bytes.\nNOTE: Replace test_case_name with the name of the test you want to give to it\n\n### Example\n`test_HLT.asm`:\n```asm\nHLT\n````\n\n`expect_HLT.dump`:\n\n```\n0 \u003c- Expected return code of the binary\n0000: 76 \u003c- Expected output/memory dump of the program.\n```\n\n### Pre-generated Test Cases\nMost instructions are covered.\nTo add new cases, extend the mnemonics tests.\n\n#### Examples\n\nGenerate Intel HEX (default):\n\n```bash\n$\u003e c85 program.asm program.hex\n```\n\nGenerate raw binary:\n\n```bash\n$\u003e c85 program.asm program.bin -r\n```\n\nGenerate memory dump for inspection:\n\n```bash\n$\u003e c85 program.asm program.dump -d\n```\n\n**Notes:**\n* If an output file already exists, it will be **overwritten**.\n---\n\nExample:\n\n```bash\nc85 examples/hello.asm build/hello.bin -r\n```\n\n## TODO Section\n\n* [x] **Lexer** – tokenize assembly source\n* [x] **Parser** – build AST from tokens\n* [x] **Code Generation** – lower AST into 8085 machine code\n* [x] **Symbol Resolution \u0026 Linking** – resolve labels, addresses, and forward references\n* [x] **Object File Generation** – outputs raw machine code or raw (hex-format) binary output to file\n* [x] **Test Case \u0026 Output Verification** - verify output against known test cases\n* [ ] **Extend Test Cases** - check for every possible point of failure of the application\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0x78%2Fcompiler85","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauth0x78%2Fcompiler85","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauth0x78%2Fcompiler85/lists"}