{"id":13599882,"url":"https://github.com/hlorenzi/customasm","last_synced_at":"2026-04-14T00:11:39.945Z","repository":{"id":39787418,"uuid":"64079877","full_name":"hlorenzi/customasm","owner":"hlorenzi","description":"💻 An assembler for custom, user-defined instruction sets! https://hlorenzi.github.io/customasm/web/","archived":false,"fork":false,"pushed_at":"2025-04-27T18:51:30.000Z","size":5475,"stargazers_count":936,"open_issues_count":33,"forks_count":63,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-04-27T19:36:25.595Z","etag":null,"topics":["asm","assembler","assembly","assembly-language","bytecode","bytecode-compiler","compiler","custom","customizable","instruction-set","instruction-set-architecture","machine-code","microprocessor","processor-architecture","rust","rust-lang","user-defined","virtual-machine","vm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hlorenzi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"github":"hlorenzi","patreon":"hlorenzi","ko_fi":"hlorenzi"}},"created_at":"2016-07-24T18:33:07.000Z","updated_at":"2025-04-27T18:51:09.000Z","dependencies_parsed_at":"2024-01-13T23:35:25.656Z","dependency_job_id":"ede72421-9d24-4528-a167-9340b1b4e60f","html_url":"https://github.com/hlorenzi/customasm","commit_stats":{"total_commits":304,"total_committers":15,"mean_commits":"20.266666666666666","dds":0.4703947368421053,"last_synced_commit":"602919d237c9197b6b5f56edffeceaed67d5a7f7"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlorenzi%2Fcustomasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlorenzi%2Fcustomasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlorenzi%2Fcustomasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlorenzi%2Fcustomasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hlorenzi","download_url":"https://codeload.github.com/hlorenzi/customasm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059512,"owners_count":22007769,"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":["asm","assembler","assembly","assembly-language","bytecode","bytecode-compiler","compiler","custom","customizable","instruction-set","instruction-set-architecture","machine-code","microprocessor","processor-architecture","rust","rust-lang","user-defined","virtual-machine","vm","webassembly"],"created_at":"2024-08-01T17:01:15.667Z","updated_at":"2026-04-14T00:11:39.904Z","avatar_url":"https://github.com/hlorenzi.png","language":"Rust","readme":"# customasm\n`customasm` is an assembler that allows you to provide your own **custom\ninstruction sets** to assemble your source files! \nIt can be useful, for example, if you're trying to test the bytecode of a new virtual machine,\nor if you're eager to write programs for that new microprocessor architecture \nyou just implemented in an FPGA chip!\n\n[![crates.io][badge-cratesio-img]][badge-cratesio-url]\n[![Latest Release][badge-latest-img]][badge-latest-url]\n[![Releases][badge-downloads-img]][badge-downloads-url]\n\n[![Discord][badge-discord-img]][badge-discord-url]\n[![GitHub Sponsor][badge-github-sponsor-img]][badge-github-sponsor-url]\n\n[badge-cratesio-img]: https://img.shields.io/crates/v/customasm\n[badge-cratesio-url]: https://crates.io/crates/customasm\n\n[badge-latest-img]: https://img.shields.io/github/v/release/hlorenzi/customasm\n[badge-latest-url]: https://github.com/hlorenzi/customasm/releases\n\n[badge-downloads-img]: https://img.shields.io/github/downloads/hlorenzi/customasm/total\n[badge-downloads-url]: https://github.com/hlorenzi/customasm/releases\n\n[badge-github-sponsor-img]: https://img.shields.io/github/sponsors/hlorenzi?label=GitHub%20Sponsors\u0026logo=GitHub\n[badge-github-sponsor-url]: https://github.com/sponsors/hlorenzi\n\n[badge-discord-img]: https://img.shields.io/discord/394999035540275222?label=Join%20the%20Discord%20server!\u0026logo=discord\n[badge-discord-url]: https://discord.com/invite/pXeDXGD\n\n[🖥️ Try it right now on your web browser!](https://hlorenzi.github.io/customasm/web/)\n\n[🕹️ Check out an example project](/examples/nes_colors.asm) which targets the NES!\n\n[⌨️ Install the VSCode syntax highlight extension!](https://marketplace.visualstudio.com/items?itemName=hlorenzi.customasm-vscode)\n\n[❤️ Support the author!](https://accounts.hlorenzi.com/supporters)\n\n## Documentation\n\n[📚 Check out the wiki](https://github.com/hlorenzi/customasm/wiki)\nfor a changelog, documentation, and a how-to-start guide!\n\n[💲 Check out the command-line help!](/src/usage_help.md) (Better formatted on the command-line itself)\n\n## Installation\n\nYou can install directly from *crates.io* by running `cargo install customasm`.\nThen the `customasm` application should automatically become available in your\ncommand-line environment.\n\nYou can also download pre-built executables from the\n[Releases section](https://github.com/hlorenzi/customasm/releases).\n\nYou can compile from source yourself by first cloning the repository and\nthen simply running `cargo build`.\nThere's also a battery of tests available at `cargo test`.\n\n## Example\n\nGiven the following file:\n\n```asm\n#ruledef\n{\n    load r1, {value: i8} =\u003e 0x11 @ value\n    load r2, {value: i8} =\u003e 0x12 @ value\n    load r3, {value: i8} =\u003e 0x13 @ value\n    add  r1, r2          =\u003e 0x21\n    sub  r3, {value: i8} =\u003e 0x33 @ value\n    jnz  {address: u16}  =\u003e 0x40 @ address\n    ret                  =\u003e 0x50\n}\n\nmultiply3x4:\n    load r1, 0\n    load r2, 3\n    load r3, 4\n    \n    .loop:\n        add r1, r2\n        sub r3, 1\n        jnz .loop\n    \n    ret\n```\n\n...the assembler will use the `#ruledef` directive to convert the\ninstructions into binary code:\n\n```asm\n outp | addr | data (base 16)\n\n  0:0 |    0 |          ; multiply3x4:\n  0:0 |    0 | 11 00    ; load r1, 0\n  2:0 |    2 | 12 03    ; load r2, 3\n  4:0 |    4 | 13 04    ; load r3, 4\n  6:0 |    6 |          ; .loop:\n  6:0 |    6 | 21       ; add r1, r2\n  7:0 |    7 | 33 01    ; sub r3, 1\n  9:0 |    9 | 40 00 06 ; jnz .loop\n  c:0 |    c | 50       ; ret\n```","funding_links":["https://github.com/sponsors/hlorenzi","https://patreon.com/hlorenzi","https://ko-fi.com/hlorenzi"],"categories":["Rust","硬件_其他"],"sub_categories":["网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlorenzi%2Fcustomasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhlorenzi%2Fcustomasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlorenzi%2Fcustomasm/lists"}