{"id":13622803,"url":"https://github.com/ibara/l80","last_synced_at":"2026-01-07T21:55:37.439Z","repository":{"id":80378374,"uuid":"375167194","full_name":"ibara/l80","owner":"ibara","description":"CP/M and MS-DOS COM executable linker written in D.","archived":false,"fork":false,"pushed_at":"2021-06-27T20:07:32.000Z","size":15,"stargazers_count":40,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-05T01:44:58.857Z","etag":null,"topics":["8080","8086","8088","coding","cp-m","cpm","d","dlang","i80","i8080","intel","linker","loader","ms-dos","msdos","programming","retro","x86","z80","zilog"],"latest_commit_sha":null,"homepage":"https://briancallahan.net/blog/20210609.html","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibara.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}},"created_at":"2021-06-08T23:06:56.000Z","updated_at":"2024-12-26T22:45:32.000Z","dependencies_parsed_at":"2023-06-06T16:30:50.736Z","dependency_job_id":null,"html_url":"https://github.com/ibara/l80","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibara%2Fl80","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibara%2Fl80/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibara%2Fl80/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibara%2Fl80/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibara","download_url":"https://codeload.github.com/ibara/l80/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246258871,"owners_count":20748573,"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":["8080","8086","8088","coding","cp-m","cpm","d","dlang","i80","i8080","intel","linker","loader","ms-dos","msdos","programming","retro","x86","z80","zilog"],"created_at":"2024-08-01T21:01:24.274Z","updated_at":"2026-01-07T21:55:37.399Z","avatar_url":"https://github.com/ibara.png","language":"D","readme":"l80\n===\n`l80` is a linker for CP/M and MS-DOS `COM` executables.\n\nIt reads in object files and libraries created by\n[`a80`](https://github.com/ibara/a80)\nand produces executable CP/M-80 binaries from them.\n\nThere are not (yet) any assemblers or compilers that\nproduce 8086 object code for `l80`. But when such programs\nappear, `l80` will already be able to handle them.\n\nYou can read an in-depth explanation of how the linker and\nobject file format work\n[here](https://briancallahan.net/blog/20210609.html).\n\nBuilding\n--------\n`l80` should build with any\n[D](https://dlang.org/)\ncompiler for any supported platform. I use\n[GDC](https://gdcproject.org/)\non\n[OpenBSD](https://www.openbsd.org/)\nand that works well.\n\nThere is a port of `l80` to C that can be compiled for\nCP/M, MS-DOS, and Unix. The C port has the following\ndifferences:\n* Only the first 15 characters of symbol names are unique.\n* On CP/M, the binary is named `ld` to avoid conflict with\n[Microsoft L80](https://altairclone.com/downloads/manuals/Microsoft%20L80%20Linker.pdf).\n\nYou can build this C version for CP/M with:\n```\n$ make cpm\n```\n\nFor MS-DOS with:\n```\n$ make dos\n```\n\nAnd for Unix with:\n```\n$ make c\n```\n\nRunning\n-------\n`usage: l80 binary file1.obj [file2.obj ...]`\n\nAll object files must end in `.obj` or `.lib`.\n\nThe `.com` extension will automatically be appended to\n`binary`.\n\nObject format\n-------------\n`l80` uses the most simple object format I could devise.\n\nObject files are comprised of control codes and data. There\nare three control codes:\n* `00`: The following byte is literal data.\n* `01`: The following bytes are a symbol declaration.\n* `02`: The following bytes are a symbol reference.\n\n`l80` uses two passes to generate the final execuatable\nbinary. The first pass writes all object files and libraries\ninto a single buffer and then collects all the symbol\ndeclarations and calculates the address of each symbol. The\nsecond pass writes out the executable, replacing references\nwith the addresses calculated during the first pass.\n\nLibraries are simply collections of object files. They can\nbe created with the\n[ar80](https://github.com/ibara/ar80)\nutility.\n\nCaveats\n-------\n`l80` does not recognize nor remove the code of unused\nsymbols. Doing so is planned.\n\nThe order of the object files and libraries can be very\nimportant.\n\nCompilers should implement name mangling for symbols not\ndestined to be globals to prevent spurious duplicate symbol\nerrors.\n\nBugs\n----\nProbably lots. Test and let me know.\n\nLicense\n-------\nISC License. See `LICENSE` for details.\n\nNote\n----\nThis `l80` is in no way related to the linker of the same\nname produced by Microsoft, also targeting CP/M-80.\n\nThat one uses a very different file format.\n","funding_links":[],"categories":["D"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibara%2Fl80","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibara%2Fl80","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibara%2Fl80/lists"}