{"id":30081809,"url":"https://github.com/0x1c1101/blazing_asm","last_synced_at":"2025-08-08T21:02:43.736Z","repository":{"id":308582964,"uuid":"989305189","full_name":"0x1c1101/blazing_asm","owner":"0x1c1101","description":"Simple, fast and lightweight Header-Only C++ Assembler Library","archived":false,"fork":false,"pushed_at":"2025-08-06T19:11:34.000Z","size":87,"stargazers_count":94,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-06T19:12:17.721Z","etag":null,"topics":["asmjit","assembler","assembler-x86","assembly","cpp20","embedded-systems","exploit-development","malware","reverse-engineering","x86-64","x86-assembly"],"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/0x1c1101.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,"zenodo":null}},"created_at":"2025-05-23T20:59:19.000Z","updated_at":"2025-08-06T19:11:37.000Z","dependencies_parsed_at":"2025-08-06T19:12:41.793Z","dependency_job_id":"c23e0692-93a3-4170-b545-d6017b6b35ee","html_url":"https://github.com/0x1c1101/blazing_asm","commit_stats":null,"previous_names":["0x1c1101/blazing_asm"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/0x1c1101/blazing_asm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x1c1101%2Fblazing_asm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x1c1101%2Fblazing_asm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x1c1101%2Fblazing_asm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x1c1101%2Fblazing_asm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0x1c1101","download_url":"https://codeload.github.com/0x1c1101/blazing_asm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x1c1101%2Fblazing_asm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269488964,"owners_count":24425564,"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-08-08T02:00:09.200Z","response_time":72,"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":["asmjit","assembler","assembler-x86","assembly","cpp20","embedded-systems","exploit-development","malware","reverse-engineering","x86-64","x86-assembly"],"created_at":"2025-08-08T21:00:53.715Z","updated_at":"2025-08-08T21:02:43.721Z","avatar_url":"https://github.com/0x1c1101.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blazing ASM\n\u003cimg src=\"https://github.com/user-attachments/assets/562c7058-7e2e-40ff-be93-7a3b57d940cb\" width=\"100\" /\u003e\n\n\n[![Discord](https://img.shields.io/badge/chat-on%20Discord-green.svg)](https://discord.gg/GdYanwSCwm)\n[![License: GPL-3.0](https://img.shields.io/badge/License-GPL3-blue.svg)](LICENSE)\n\n\nA simple and lightweight assembler library that supports the majority of significant instructions from the Intel x86-64 architecture. Mainly beneficial for shellcode development and runtime bytecode generation. Due to its design, it can produce the machine code quite fast while allowing you to generate and use random registers/immediates at runtime.\n\n## Requirements\n\n- C++20 or above\n- STL is not required (Compatible with kernel driver projects)\n\n## Why not use AsmJit?\n\nIf you need to generate x86-64 machine code with minimal overhead and maximum control, `BlazingASM` is a powerful alternative to dynamic assemblers like AsmJit. Designed entirely for compile-time code generation, it emits raw, fixed-size machine instructions directly into static arrays, eliminating the need for runtime encoding or memory management. Its single-header design requires no dependencies, making it lightweight and easy to integrate ~ even in bare-metal or embedded environments. With predictable instruction layout, very little to zero runtime allocation, and clean, assembly-like syntax, it is particularly well-suited for shellcode generation, firmware, code mutation or any scenario where performance, binary size, and determinism matter.\n\nThat being said, `BlazingASM` is intentionally minimal and focused; it doesn’t aim to match AsmJit’s vast instruction coverage, runtime flexibility, or feature set. Instead, it trades breadth for simplicity and performance ~ making it a practical tool when you know exactly what code you need, and want it fast and small.\n\nFor a better demonstration, below is a screenshot of the comparison between the code and the disassembly (`assemble_static()` mode):\n\n![assemble_static_disassembly](https://github.com/user-attachments/assets/97f339c1-a1e7-4b66-a3f6-4e8e3e774ead)\n\nIf you wish to use the dynamic code generation, below is a screenshot of the comparison between the code and the decompilation on IDA (`assemble()` mode):\n\n![assemble_decompile](https://github.com/user-attachments/assets/ffa45f56-aefe-4b4e-afec-241210ca3413)\n\n\n## Instructions Supported\n\n| **Category**              | **Instruction**                                        | **Description**                                                    |\n| ------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------ |\n| **Data Movement**         | `MOV`                                                  | Register/Memory/Immediate moves                                    |\n|                           | `LEA`                                                  | Load effective address                                             |\n|                           | `DB(...)`                                              | Define raw byte(s) (data injection)                                |\n| **Arithmetic (GRP1)**     | `ADD`, `OR`, `ADC`, `SBB`, `AND`, `SUB`, `XOR`, `CMP`  | Basic arithmetic and bitwise operations                            |\n|                           | `TEST`                                                 | Bitwise AND for flag setting (no result stored)                    |\n| **Shifts/Rotates (GRP2)** | `ROL`, `ROR`, `RCL`, `RCR`, `SHL`, `SAL`, `SHR`, `SAR` | Support both constant and 1-bit variants (`ROL1`, `ROR1`, etc.)    |\n| **Unary Ops (GRP3)**      | `NOT`, `NEG`                                           | Logical negation, two's complement                                 |\n|                           | `MUL`, `IMUL`                                          | Unsigned and signed multiplication                                 |\n|                           | `DIV`, `IDIV`                                          | Unsigned and signed division                                       |\n| **Control Flow**          | `JCC`                                                  | Conditional jumps via `Conditions` enum                            |\n|                           | `JMP`, `JMP32`                                         | Unconditional jump (near and 32-bit override)                      |\n|                           | `CALL`, `CALL32`                                       | Near calls (with 32-bit override support)                          |\n| **Stack Operations**      | `PUSH`, `PUSH32`, `POP`, `POP32`                       | Push/pop values (supports 64-bit and 32-bit override)              |\n|                           | `POPF`, `PUSHF`                                        | Push/pop flags                                                     |\n| **Fixed Instructions**    | `RET`                                                  | Return from procedure                                              |\n|                           | `NOP`                                                  | No operation                                                       |\n| **Planned**               |  `FPU Ops`, `INC/DEC`                                  | 🚧 Coming Soon...                                                  |\n\n## Setting it up\n\nAll you need to do is download the `blazing_asm.hpp` header file, paste it into your project folder, and add this in your source code:\n\n```cpp\n#include \"blazing_asm.hpp\"\n\n.\n.\n.\n\nauto shellcode = basm::assemble_static (\n  basm::MOV (basm::RAX, basm::RBX),\n  basm::MOV (basm::RCX, basm::RDX)\n);\n```\n\nOr you can define `basm` namespace for a simpler syntax:\n\n```cpp\nusing namespace basm;\n\nauto shellcode = assemble_static (\n  MOV (RAX, RBX),\n  MOV (RCX, RDX)\n);\n```\n\n## Usage\n\nYou can find the detailed explanation in the [Documentation Page](DOCUMENTATION.md).\n\n## 🚧 Note\n\nThis project is currently in development, so if you come across any problems, please create an issue. Also, feel free to contribute and improve.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x1c1101%2Fblazing_asm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0x1c1101%2Fblazing_asm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x1c1101%2Fblazing_asm/lists"}