{"id":20775822,"url":"https://github.com/nickgeek/lmc-to-c","last_synced_at":"2026-04-21T16:31:47.217Z","repository":{"id":73437075,"uuid":"117416060","full_name":"NickGeek/lmc-to-c","owner":"NickGeek","description":"Generates C code from LMC assembly","archived":false,"fork":false,"pushed_at":"2018-01-15T09:32:54.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T21:32:41.385Z","etag":null,"topics":["assembler","assembly","education","lmc"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NickGeek.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-01-14T09:00:22.000Z","updated_at":"2021-01-05T03:56:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6ce41c7-4539-46cc-b520-cfcf05615aa5","html_url":"https://github.com/NickGeek/lmc-to-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NickGeek/lmc-to-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickGeek%2Flmc-to-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickGeek%2Flmc-to-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickGeek%2Flmc-to-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickGeek%2Flmc-to-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NickGeek","download_url":"https://codeload.github.com/NickGeek/lmc-to-c/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickGeek%2Flmc-to-c/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262762432,"owners_count":23360326,"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","assembly","education","lmc"],"created_at":"2024-11-17T12:39:27.072Z","updated_at":"2026-04-21T16:31:47.182Z","avatar_url":"https://github.com/NickGeek.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LMC to C\nThis program generates C code from [LMC assembly](http://www.vivaxsolutions.com/web/lmc.aspx). The script reads from stdin so you can run it and just start typing assembly, and leave a newline to generate the C code, or pipe in a script. Using shell magic you can even convert, compile, and run in one line:\n\n```bash\ncat fib.asm | python3 parser.py | gcc -xc -; ./a.out\n```\n\nYou can also specify a memory size as a command line argument to `parser.py` like: `python3 parser.py 500` to have 500 cells of memory instead of the default 100.\n\n## Extra Instructions\n| Instruction | Op Code | Description                                                                                 |\n| ----------- | ------- | ------------------------------------------------------------------------------------------- |\n| `DBG`       | 401     | Prints the current value in the register, the program counter value, and the data in memory |\n| `IST`       | 903     | Like `INP` but it accepts a character as input rather than a number                         |\n| `OST`       | 904     | Outputs the current value in memory as a character instead of a number                      |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickgeek%2Flmc-to-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickgeek%2Flmc-to-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickgeek%2Flmc-to-c/lists"}