{"id":15060069,"url":"https://github.com/doubleshotgun/rasm","last_synced_at":"2026-01-06T15:45:23.864Z","repository":{"id":252759286,"uuid":"841320368","full_name":"DoubleShotgun/Rasm","owner":"DoubleShotgun","description":"Making assembly easier with Rasm","archived":false,"fork":false,"pushed_at":"2024-09-15T05:05:26.000Z","size":220,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T16:13:19.649Z","etag":null,"topics":["assembler","assembly","c","nelua","risc-v","risc-v64","riscv","riscv64"],"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/DoubleShotgun.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":"2024-08-12T07:06:08.000Z","updated_at":"2024-11-19T23:55:43.000Z","dependencies_parsed_at":"2024-09-15T09:19:50.523Z","dependency_job_id":null,"html_url":"https://github.com/DoubleShotgun/Rasm","commit_stats":null,"previous_names":["doubleshotgun/rasm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DoubleShotgun/Rasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubleShotgun%2FRasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubleShotgun%2FRasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubleShotgun%2FRasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubleShotgun%2FRasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DoubleShotgun","download_url":"https://codeload.github.com/DoubleShotgun/Rasm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubleShotgun%2FRasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278028936,"owners_count":25918069,"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","status":"online","status_checked_at":"2025-10-02T02:00:08.890Z","response_time":67,"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":["assembler","assembly","c","nelua","risc-v","risc-v64","riscv","riscv64"],"created_at":"2024-09-24T22:52:06.389Z","updated_at":"2025-10-02T15:31:13.021Z","avatar_url":"https://github.com/DoubleShotgun.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rasm\n\nRasm is a simple but powerful [RISC-V](https://riscv.org/about/) (RV64I) assembler that aims to make the syntax to be more like [C](https://en.wikipedia.org/wiki/C_(programming_language)), and it's written in [Nelua](https://nelua.io).\n\u003cbr\u003e\n\n## Syntax\n\nRasm's syntax is just like the RV64 standard, except for these changes: \n\n- Load a string globally. \u003cbr\u003e\n`String = \"Hello!\"` \u003cbr\u003e\n`String` is now a label!\n- Prefixing a label with '%' while refering, gets the length of the label.\n`li a0,%String`\n- Calling a function. \u003cbr\u003e\n```\nfunction:\n...\nret\n\nfunction(1,String)\n```\nThis is the equivalent to:\n\n```\nli a0,1\nla a1,String\ncall function\n```\n(Also the load and store instructions no longer have the special syntax. \u003cbr\u003e\n`ld rd,imm(r1) -\u003e ld rd,r1,imm`) \u003cbr\u003e\n\n## Usage\n```\nUsage: rasm [d][s][o a.out] filein.asm\n'-' are optional.\n```\n* Options\n\t- d: dump compiled raw binary to 'dump.bin'\n\t- s: add section name\n\t- o a.out: outfile for compiled code\n\n## Instruction Set\n\n- [x] RV64I Base \u003cbr\u003e\n- [x] Pseudoinstruction \u003cbr\u003e\n- [x] Integer Multiplication and Division Extension \u003cbr\u003e\n- [ ] Single-Precision Floating-Point Extension \u003cbr\u003e\n- [ ] Double-Precision Floating-Point \u003cbr\u003e\n- [ ] Compressed Instructions\n## Setup \u0026 Install\n\n### Install Qemu User Static\n\nYou will need Qemu User Static run to the executable.\n\nDebian/Ubuntu (apt)\n```\napt update\napt install qemu-user-static\n```\nVoid Linux (xbps)\n```\nxbps-install -Su qemu-user-static\n```\n\n### Building with Nelua:\n1. [Install Nelua](https://nelua.io/installing/)\n2. Clone Rasm `git clone https://github.com/Doubleshotgun/Rasm`\n3. Compile \n```\ncd Rasm\nmake\n```\n\n\n### Building with GCC/Clang:\n1. Clone Rasm `git clone https://github.com/Doubleshotgun/Rasm`\n2. Compile \n```\ncd Rasm\nmake CC\n```\n\n### Installing\nThe executable is automatically install at `/usr/local/bin/`\n## Example\n\n- example.asm\n\n```\nexit = 93\n\n_start:\n\tli a7,exit\n  li a0,69\n  ecall\n```\n- bash\n\n```\nrasm example.asm\nqemu-riscv64-static a.out\necho $?\n```\n\nThis program returns exit code of 69, `echo $?` prints the exit code of the last program\n\nSee the [example](https://github.com/DoubleShotgun/Rasm/blob/main/example) folder for more.\n\n## Todo\n- [x] Rework the \"Syntax system\".\n- [x] Rework the syntax of \"call\" and \"ecall\".\n- [x] Better error message.\n- [x] Add hex notation.\n- [ ] Add array, struct and vectors.\n*   Make standard library.\n\t- [ ] syscall\n\t- [ ] io\n\t- [ ] string\n\t- [ ] time\n\t- [ ] math\n\t- [ ] fb (frame buffer device)\n\n- [ ] Tested on Window.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoubleshotgun%2Frasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoubleshotgun%2Frasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoubleshotgun%2Frasm/lists"}