{"id":18882190,"url":"https://github.com/cub3d/mcc","last_synced_at":"2026-05-15T01:05:10.190Z","repository":{"id":86930905,"uuid":"164513386","full_name":"CUB3D/MCC","owner":"CUB3D","description":"The microcode compiler","archived":false,"fork":false,"pushed_at":"2019-01-08T00:28:58.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-23T23:36:02.420Z","etag":null,"topics":["assembler","cplusplus","cpp17"],"latest_commit_sha":null,"homepage":null,"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/CUB3D.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}},"created_at":"2019-01-07T23:24:48.000Z","updated_at":"2019-01-08T11:26:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5762842-1ea8-4300-a7a8-f56f2d47e542","html_url":"https://github.com/CUB3D/MCC","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/CUB3D%2FMCC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CUB3D%2FMCC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CUB3D%2FMCC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CUB3D%2FMCC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CUB3D","download_url":"https://codeload.github.com/CUB3D/MCC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CUB3D%2FMCC/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":257243741,"owners_count":22513368,"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":["assembler","cplusplus","cpp17"],"created_at":"2024-11-08T06:54:35.358Z","updated_at":"2025-10-15T08:14:58.463Z","avatar_url":"https://github.com/CUB3D.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCC\nThe microcode compiler*\n\n![aa](https://api.travis-ci.com/CUB3D/MCC.svg?token=Bc8txnT1MmVtuHW2CHM3\u0026branch=master)\n\n\n\n\\* Not actually a compiler, more of an assembler\n\nMCC is a multi target NASM syntax assembler, that produces machine code for on a provided ISA\n\nOutput formats currently available\n---\n* logisim v2.0 raw roms\n* Raw rom - WIP\n\nExample program\n---\n```\n; Bootstrap instruction\nmov PC, ML\nmov RAM, IR\n\n.fill 0xF\n; Read RAM to A\nmov IR, ML\nmov RAM, A\ninc PC\nmov PC, ML\nmov RAM, IR\n\n.fill 0xB\n; Read RAM to B\nmov IR, ML\nmov RAM, B\ninc PC\nmov PC, ML\nmov RAM, IR\n\n.fill 0xC\n; Read ALU to A\nmov ALU, A\ninc PC\nmov PC, ML\nmov RAM, IR\n```\n\nExample output\n---\n```\nv2.0 raw\n5 50 15*0 1004 90 2 5 50 11*0\n1004 14 2 5 50 12*0 2080 2 5\n50\n```\n\nISA\n---\nMachine code generation requires a valid ISA configuration, which sepcifies information such as the available registers,\nthe control bits and instruction timing. ISAs are specified in JSON, like the following example.\n```\n{\n  \"Registers\": {\n    \"ALU\": {\n      \"ReadBit\": \"00002000\"\n    },\n    \"A\": {\n      \"ReadBit\": \"00000200\",\n      \"WriteBit\": \"00000080\"\n    },\n    \"B\": {\n      \"WriteBit\": \"00000004\"\n    },\n    \"ML\": {\n      \"ReadBit\": \"00000008\",\n      \"WriteBit\": \"00000004\"\n    },\n    \"PC\": {\n      \"ReadBit\": \"00000001\",\n      \"IncrementBit\": \"00000002\"\n    },\n    \"IR\": {\n      \"ReadBit\": \"00001000\",\n      \"WriteBit\": \"00000040\"\n    },\n    \"RAM\": {\n      \"ReadBit\": \"00000010\",\n      \"WriteBit\": \"00000020\"\n    }\n  }\n}\n```\n\nBuilding\n---\n* Clone repo\n\n```\ngit clone --recursive https://github.com/CUB3D/MCC \n```\n* Build\n\n```\nmkdir build\ncd build\ncmake ..\nmake -j 4\n```\n\n* Run\n```\n./mcc -i input.mcc -o out.rom --arch=cpu.arch\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcub3d%2Fmcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcub3d%2Fmcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcub3d%2Fmcc/lists"}