Что такое формат файла ASM?
.asm files store source code for applications written in a low-level programming language. This format stores data in plain text, which can be accessed using any text editor. However, dedicated editors are recommended for editing such files, as they offer helpful features such as line numbering and syntax highlighting.
Assembly language is a low-level programming language that works closely with a processor architecture's machine code instructions. Assembly code is stored in .asm files. The first assemblers were created in the late 1940s. The language was highly popular until the 1980s (or 1990s, depending on the architecture), when higher-level languages were introduced, such as C or Pascal. High-level programming languages offered a cleaner syntax and a more intuitive programming interface, as well as significantly expanded functionality. Nevertheless, assembly is still the language of choice when performance is critical or when code must interact directly with hardware - used in OS kernels, bootloaders, embedded firmware, and device drivers.
Assembly languages are also used for writing malware or computer viruses that directly target CPUs and bypass many operating system routines.
Source code stored in an .asm file must be processed by an assembler - not a compiler - which converts it into a machine-code object file (.obj or .o). A linker then combines one or more object files into a runnable executable such as an EXE file. Common assemblers include MASM (Microsoft Macro Assembler), NASM, and GNU as (GAS). Each uses a distinct dialect; .asm source written for MASM is generally not compatible with GAS without modifications.
Безопасность и защита
РИСК: LOWReading or editing a .asm is completely safe - it is plain text and does nothing until assembled and run. The risk is only in what the code DOES once you assemble and execute it: like any source, an .asm can contain malicious logic, and assembly is a common form for shellcode and malware proof-of-concepts. Inspect unfamiliar assembly before building it, and never run a compiled binary from an untrusted .asm without understanding it. The file itself carries no macros or auto-execution.
Детали формата
в двух словах- SolidWorks / Pro-ENGINEER (Creo) Assembly file - Some CAD tools use .asm for binary 3D assembly documents (Pro/E .asm, and informally for SolidWorks); these are binary CAD files, unrelated to assembly source code - see .sldasm.
- Generic 'assembly' data files - Various niche apps name part-assembly or build-assembly data files .asm; identify by the owning application.
Программы, открывающие файлы ASM
Технические подробности
глубокая спецификация| File type | Plain-text assembly-language source code |
| MIME type | text/x-asm (also text/x-assembly, text/plain) |
| Character encoding | ASCII or UTF-8; legacy DOS sources may use code pages such as CP437 |
| File signature | None - no magic bytes; identified by extension and content (mnemonics and directives) |
| Line structure | Each line holds an optional label, a mnemonic with operands, and an optional comment |
| Comment syntax | ; in MASM/NASM; # or @ in GNU as (GAS); * in some 6502/68k assemblers |
| Typical file size | 1 KB - 500 KB; generated listing files may be larger |
| Output artifact | Assembled into an object file (.obj / .o), then linked into an executable |
| Common assembler dialects | MASM, NASM, GNU as (AT&T syntax), TASM, ARM/Keil assembler |
| Target ISAs | x86/x86-64, ARM/AArch64, MIPS, RISC-V, AVR, 6502, Z80, and many others |
| Dialect portability | Not portable across assembler dialects without modification; syntax and directives differ significantly |
| Macro support | Supported in most assemblers: MACRO/ENDM in MASM, %macro/%endmacro in NASM, .macro/.endm in GAS |
| Include mechanism | INCLUDE (MASM), %include (NASM), .include (GAS) - splits source across multiple files |
| Typical use cases | OS kernels, bootloaders, firmware, cryptographic routines, game-engine hot paths, malware analysis |
| Выпущен | 1940s-1950s (assembly languages); .asm convention popularized by DOS/MASM era (1980s) |
| Последняя версия | N/A (text source; depends on the target ISA and assembler dialect, not a versioned file format) |
| Открыть стандартное | Да · без роялти |
| Спецификация | sourceware.org |
Конвертации ASM
Вопросы и ответы сообщества
спрошено пользователямиВопросов пока нет - станьте первым, кто спросит о файлах ASM.