{"id":19713058,"url":"https://github.com/deathkiller/cx-compiler","last_synced_at":"2026-06-09T04:32:24.286Z","repository":{"id":149357889,"uuid":"155769243","full_name":"deathkiller/cx-compiler","owner":"deathkiller","description":"Cx Compiler: Experimental compiler for modified C language to i386 DOS executables","archived":false,"fork":false,"pushed_at":"2019-11-18T19:58:44.000Z","size":711,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T20:29:30.769Z","etag":null,"topics":["compiler","cpp","dos","i386","x86"],"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/deathkiller.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":"2018-11-01T20:03:40.000Z","updated_at":"2025-02-04T08:28:11.000Z","dependencies_parsed_at":"2023-11-24T03:45:09.016Z","dependency_job_id":null,"html_url":"https://github.com/deathkiller/cx-compiler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deathkiller/cx-compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathkiller%2Fcx-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathkiller%2Fcx-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathkiller%2Fcx-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathkiller%2Fcx-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deathkiller","download_url":"https://codeload.github.com/deathkiller/cx-compiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathkiller%2Fcx-compiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34092253,"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-06-09T02:00:06.510Z","response_time":63,"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":["compiler","cpp","dos","i386","x86"],"created_at":"2024-11-11T22:19:28.329Z","updated_at":"2026-06-09T04:32:24.281Z","avatar_url":"https://github.com/deathkiller.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    Cx Compiler\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n    Compiler for modified C language to i386 DOS executables\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003e\n    Brought to you by \u003ca href=\"https://github.com/deathkiller\"\u003e@deathkiller\u003c/a\u003e\n  \u003c/sub\u003e\n\u003c/div\u003e\n\u003chr/\u003e\n\n\n## Introduction\nCompiler that supports modified version of C language and creates original DOS executables for i386 architecture. The executables run on MS-DOS, FreeDOS, 32-bit MS Windows using NTVDM, DosBox and other similar platforms. Currently supports several types of variables, pointers, dynamic memory allocation, branching and looping, includes and much more.\n\n[![Build Status](https://img.shields.io/appveyor/ci/deathkiller/cx-compiler/master.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2ZmZmZmZiIgZD0iTTI0IDIuNXYxOUwxOCAyNCAwIDE4LjV2LS41NjFsMTggMS41NDVWMHpNMSAxMy4xMTFMNC4zODUgMTAgMSA2Ljg4OWwxLjQxOC0uODI3TDUuODUzIDguNjUgMTIgM2wzIDEuNDU2djExLjA4OEwxMiAxN2wtNi4xNDctNS42NS0zLjQzNCAyLjU4OXpNNy42NDQgMTBMMTIgMTMuMjgzVjYuNzE3eiI+PC9wYXRoPjwvc3ZnPg==)](https://ci.appveyor.com/project/deathkiller/cx-compiler)\n[![Code Quality](https://img.shields.io/codacy/grade/06fe278f2bdf43768bcc3615a482e42a.svg?logo=codacy\u0026logoColor=ffffff)](https://www.codacy.com/app/deathkiller/cx-compiler)\n[![License](https://img.shields.io/github/license/deathkiller/cx-compiler.svg)](https://github.com/deathkiller/cx-compiler/blob/master/LICENSE)\n[![Lines of Code](https://img.shields.io/badge/lines%20of%20code-10k-blue.svg)](https://github.com/deathkiller/cx-compiler/graphs/code-frequency)\n\nRequires [Microsoft Visual Studio 2015](https://www.visualstudio.com/) or newer (or equivalent C++11 compiler) to build the solution.\n\n\n## Usage\n* Run `Compiler.exe \"Path to source code\" \"Path to output executable\" /target:dos` to compile specified source code file to executable.\n* Run `Compiler.exe \"Path to output executable\" /target:dos` to use the compiler in interactive mode and write source code directly to command line/terminal.\n\n\n## Example\n```c\n// Pointer types are allowed everywhere\nbool BinarySearch(uint32* array, uint32 size, uint32 key, uint32* index) {\n    uint32 low, high, mid;\n    low = 0;\n    high = (size - 1);\n    while (low \u003c= high) {\n        mid = (low + high) / 2;\n        if (key == array[mid]) {\n            index[0] = mid;\n            return true;\n        }\n\n        if (key \u003c array[mid]) {\n            high = mid - 1;\n        } else {\n            low = mid + 1;\n        }\n    }\n    \n    return false;\n}\n\nuint8 Main() {\n    // Print to console\n    PrintString(\"Example application - Binary search\\r\\n\");\n    PrintNewLine();\n    PrintString(\"Enter size of array: \");\n    // Read user input\n    uint32 size = ReadUint32();\n    PrintNewLine();\n\n    // Allocate memory on heap\n    uint32* array = alloc\u003cuint32\u003e(size);\n    if (array == null) {\n        PrintString(\"Cannot allocate required memory block!\\r\\n\");\n        return 1;\n    }\n\n    uint32 i;\n    uint32 last = 0;\n    for (i = 0; i \u003c size; ++i) {\n        PrintString(\"Enter #\");\n        PrintUint32(i + 1);\n        PrintString(\" number: \");\n        array[i] = ReadUint32();\n        PrintNewLine();\n        \n        if (array[i] \u003c last) {\n            PrintString(\"The number must be bigger than the previous one. Try it again!\\r\\n\");\n            --i;\n        } else {\n            last = array[i];\n        }\n    }\n\n    PrintString(\"Enter number to find in the array: \");\n    uint32 key = ReadUint32();\n    PrintNewLine();\n    \n    uint32 index = 0;\n    // Call method with one parameter passed by reference\n    bool found = BinarySearch(array, size, key, \u0026index);\n    if (found == true) {\n        PrintString(\"The number found on position: \");\n        PrintUint32(index + 1);\n        PrintNewLine();\n    } else {\n        PrintString(\"The number was not found!\\r\\n\");\n    }\n\n    // Release allocated memory\n    release(array);\n    return 0;\n}\n```\n\n\n## License\nThis project is licensed under the terms of the [GNU General Public License v3.0](./LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeathkiller%2Fcx-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeathkiller%2Fcx-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeathkiller%2Fcx-compiler/lists"}