{"id":19293524,"url":"https://github.com/reloaded-project/reloaded.assembler","last_synced_at":"2025-06-15T13:05:12.298Z","repository":{"id":56744843,"uuid":"162850876","full_name":"Reloaded-Project/Reloaded.Assembler","owner":"Reloaded-Project","description":"Minimal .NET wrapper around the simple, easy to use Flat Assembler written by Tomasz Grysztar. Supports both x64 and x86 development.","archived":false,"fork":false,"pushed_at":"2024-03-03T04:57:20.000Z","size":802,"stargazers_count":38,"open_issues_count":4,"forks_count":18,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-23T05:48:16.504Z","etag":null,"topics":["csharp","fasm","game-hacking","hacking","memory","process-manipulation","windows","x64","x86","x86-64","x86-x64"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Reloaded-Project.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}},"created_at":"2018-12-23T00:08:10.000Z","updated_at":"2025-05-16T07:18:47.000Z","dependencies_parsed_at":"2022-08-16T01:20:18.996Z","dependency_job_id":null,"html_url":"https://github.com/Reloaded-Project/Reloaded.Assembler","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/Reloaded-Project/Reloaded.Assembler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reloaded-Project%2FReloaded.Assembler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reloaded-Project%2FReloaded.Assembler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reloaded-Project%2FReloaded.Assembler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reloaded-Project%2FReloaded.Assembler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Reloaded-Project","download_url":"https://codeload.github.com/Reloaded-Project/Reloaded.Assembler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Reloaded-Project%2FReloaded.Assembler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259981458,"owners_count":22941147,"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":["csharp","fasm","game-hacking","hacking","memory","process-manipulation","windows","x64","x86","x86-64","x86-x64"],"created_at":"2024-11-09T22:35:17.795Z","updated_at":"2025-06-15T13:05:12.200Z","avatar_url":"https://github.com/Reloaded-Project.png","language":"C#","readme":"\r\n\u003cdiv align=\"center\"\u003e\r\n\t\u003ch1\u003eProject Reloaded: Assembler Library\u003c/h1\u003e\r\n\t\u003cimg src=\"https://i.imgur.com/BjPn7rU.png\" width=\"150\" align=\"center\" /\u003e\r\n\t\u003cbr/\u003e \u003cbr/\u003e\r\n\t\u003cstrong\u003e\u003ci\u003ex86 Assembly is like IKEA Furniture\u003c/i\u003e\u003c/strong\u003e\r\n\t\u003cbr/\u003e \u003cbr/\u003e\r\n\t\u003c!-- Coverage --\u003e\r\n\t\u003ca href=\"https://codecov.io/gh/Reloaded-Project/Reloaded.Assembler\"\u003e\r\n\t\t\u003cimg src=\"https://codecov.io/gh/Reloaded-Project/Reloaded.Assembler/branch/master/graph/badge.svg\" alt=\"Coverage\" /\u003e\r\n\t\u003c/a\u003e\r\n\t\u003c!-- NuGet --\u003e\r\n\t\u003ca href=\"https://www.nuget.org/packages/Reloaded.Assembler\"\u003e\r\n\t\t\u003cimg src=\"https://img.shields.io/nuget/v/Reloaded.Assembler.svg\" alt=\"NuGet\" /\u003e\r\n\t\u003c/a\u003e\r\n\u003c/div\u003e\r\n\r\n# Introduction\r\nReloaded.Assembler is a minimal .NET wrapper around the simple, easy to use Flat Assembler written by Tomasz Grysztar.\r\n\r\nIt combines the standard tried and tested `FASM` DLL and a and the recent experimental official `FASMX64` DLL to provide JIT, on the fly assembly of user supplied mnemonics inside x86 and x64 programs.\r\n\r\n## Getting Started\r\n\r\nTo get started, install the package from NuGet and simply create a new instance of the `Assembler` class from the `Reloaded.Assembler` namespace:\r\n\r\n```csharp\r\nvar assembler = new Assembler();\r\n``` \r\nAnd, uh... well... that's it.\r\n\r\nFrom there you can call `GetVersion()` to retrieve the version of FASM assembler that the wrapper wraps around and assemble mnemonics with `Assemble()`.\r\n\r\n### Example\r\n\r\n```csharp\r\nvar asm = new Assembler();\r\nstring[] mnemonics = new[]\r\n{\r\n    \"use32\",\r\n    \"jmp dword [0x123456]\"\r\n};\r\nbyte[] actual = asm.Assemble(mnemonics);\r\n// Result: 0xFF, 0x25, 0x56, 0x34, 0x12, 0x00\r\n```\r\n\r\n\r\nJust don't forget to dispose the assembler when you're done 😉,\r\n\r\n```csharp\r\nassembler.Dispose();\r\n```\r\n\r\n### Small Tip\r\n\r\nIf the assembly operations fail, the wrapper library will throw an exception with a summary of the error. \r\n\r\nYou can obtain a slightly more detailed versions of the exceptions by catching them\r\nexplicitly and checking their properties.\r\n\r\n```csharp\r\ntry { asm.Assemble(mnemonics); }\r\ncatch (FasmException ex)\r\n{\r\n    // Assembler result (e.g. Error, OutOfMemory) : ex.Result\r\n    // Original text given to the assembler: ex.Mnemonics\r\n    // Line of text error occured in: ex.Line\r\n    // The error itself: ex.ErrorCode\r\n}\r\n```\r\n## Reloaded Assembler Compared to FASM.NET\r\n\r\nReloaded.Assembler is not the only standalone library that exposes FASM to the world of .NET. For a while now, there has been another wrapper worth mentioning willing to fulfill the same purpose.\r\n\r\nBelow is a quick list of differences you should expect when using Reloaded.Assembler as opposed to `FASM.NET`; and some of the reasons why I decided to write this library \r\n\r\n### Advantages\r\n- Does not require the Visual C++ Runtime to operate.\r\n- Can be used in both x64 and x86 applications vs only x86.\r\n- No memory allocation on each assembly request, reuses the same buffers resulting in better performance.\r\n\r\n### Other Differences\r\n- Reloaded.Assembler is written in pure C#, FASM.NET is written in C++/CLI.\r\n- Reloaded.Assembler has a slightly more minimal interface.\r\n\r\n## Misc Notes\r\nVersion 1.0.0 of the library uses custom modified FASMX64. \r\n(Official version at the time had a bug in DLLEntryPoint that prevented it from loading).\r\n\r\nVersion 1.0.1 and onward use the official FASMX64 DLL.\r\n\r\n## Other Links\r\n\r\nFlat Assembler forums post : https://board.flatassembler.net/topic.php?p=207558#207558\r\n\r\nThis post briefly describes the changes I made to the experimental `FASMX64` DLL for version 1.0.0 of this library that made it consumable from C# (and likely other high level languages). \r\n\r\n## Contributions\r\nAs with the standard for all of the `Reloaded-Project`, repositories; contributions are very welcome and encouraged.\r\n\r\nFeel free to implement new features, make bug fixes or suggestions so long as they are accompanied by an issue with a clear description of the pull request 😉.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freloaded-project%2Freloaded.assembler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freloaded-project%2Freloaded.assembler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freloaded-project%2Freloaded.assembler/lists"}