AmmAsm - x86-64 Assembler

Version 3.0.1

Chapter 1: Introduction

1.1 What is AmmAsm?

AmmAsm is a handwritten x86-64 assembler written in C. It directly generates machine code and does not use NASM, GAS or another assembler as a backend. The assembler is designed around direct instruction encoding and provides support for modern x86-64 instruction set extensions, including APX, AVX, AVX2 and AVX-512. AmmAsm can produce ELF64 relocatable, executable and position-independent output. It also contains experimental support for PE32+ output. It has a slightly modified Intel-like syntax and a macro system.

Warn: This documentation is not designed for complete beginners. If you have never written assembly before, that is totally okay, but you might struggle with some terms, as this documentation describes not only AmmAsm syntax, behavior, but also how AmmAsm works under the hood.

1.2 Why AmmAsm and not NASM/GAS or any other assembler?

AmmAsm is a 64-bit-only assembler without legacy features of the entire x86 architecture. It supports modern ISAs such as AVX, AVX2, AVX-512, AVX10.1 and APX with a simple and readable backend. AmmAsm also aims to address some issues found in other assemblers when working with modern ISAs. E.g: Nasm.

1.3 License

AmmAsm is released under the MIT License.

Copyright 2025-2026 the AmmAsm Author – All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.