att2intel is a Python command-line tool that converts x86/x86-64 GNU assembly (.s) files from AT&T syntax to Intel syntax (GAS .intel_syntax noprefix style). It requires only Python 3.6+ with no external dependencies.
Conversions Performed
- Register prefixes —
%rax,%eax→rax,eax - Immediate prefixes —
$42,$0xff→42,0xff - Operand order —
mov %rax, %rbx(src, dst) →mov rbx, rax(dst, src) - Memory operands —
disp(%base, %index, scale)→[base + index*scale + disp] - Size suffixes —
movl,addq,cmpb→mov DWORD PTR,add,cmp BYTE PTR - Sign-extend mnemonics —
cltq,cwtl,cbtw→cdqe,cwde,cbw - Move sign/zero extend —
movzbl,movswq→movzx BYTE PTR,movsx WORD PTR - Segment overrides —
%fs:0x28(%rbp)→fs:[rbp + 0x28] - RIP-relative addressing —
symbol(%rip)→[rip + symbol] - Indirect calls/jumps —
*%rax,*(%rax)→rax,[rax] - Lock/rep prefixes, labels, directives, and comments — preserved unchanged
Usage
python3 att2intel.py <source_directory> [output_directory]
It recursively finds all .s files in the source directory, converts each line, and writes the output with .intel_syntax noprefix prepended. If no output directory is specified, it defaults to code_intel_gas/.
Example project converted with this tool: MasterPiece.x64.Assembly
New Beta Release of ACMX2 for macOS Tahoe
New ACMX2 Android App. Designed for newer devices.
New Redesign of MXCMD website as welll as a new beta release for Windows X64 and full source code to compile on other platforms.
I took my years of C++ Examples/Notes I made from reading many books on C++ and used GenAI to turn it into a website to document each example, and place them all in a nice tree structure. They are sorted by the year of the standard, be C++11, C++17, or C++20/23.
You can view the page here: Jared's Modern C++ Examples


