.ASM

Файл ASM

Assembly Language Source Code File
Задать вопрос
БЫСТРЫЙ ОТВЕТ

An ASM file is assembly language source code - a plain-text file of low-level CPU instructions. Open it in any text editor to read or edit it. To run the code, assemble it with NASM, MASM, or GNU as into an object file, then link it into an executable. Note that some CAD programs (Pro/ENGINEER, SolidWorks) also use .asm for binary 3D assembly documents - those are unrelated to source code.

Разработчик: N/A (open text format; assembler syntax varies by toolchain - MASM, NASM, GAS, ARM as) Категория: Файлы разработчика Открыть стандартное MIME: text/x-asm
ОТКРЫВАЕТСЯ НА Windows macOS Linux
Связанные: .DO · .MD · .HEX · .XSD

На этой странице

Проиндексировано расширений: 19k+
Последняя проверка: Sep 3, 2026

Не знаете, что это за файл?

Перетащите любой файл в наш идентификатор - мы прочитаем первые байты, чтобы определить формат.

Идентифицировать файл

Что такое формат файла 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.

Безопасность и защита

РИСК: LOW

Reading 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.

Детали формата

в двух словах
ПОЛНОЕ НАЗВАНИЕAssembly Language Source Code Fileтакже известен как Assembler source file, ASM source
РАЗРАБОТЧИКN/A (open text format; assembler syntax varies by toolchain - MASM, NASM, GAS, ARM as)с 1940s-1950s (assembly languages); .asm convention popularized by DOS/MASM era (1980s)
MIME-ТИПtext/x-asm
ТИПPlain-text assembly-language source code (human-readable)
СТАНДАРТОткрытый · без роялти
СВЯЗАННЫЕ.do.md.hex.xsd
Это расширение также используется в…
  • 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

Windows4 apps
Notepad Открытый код Open the .asm as text; built-in Assembly syntax highlighting under Language > A > Assembly.
Visual Studio Code Бесплатно Open the .asm to read/edit with syntax highlighting (x86/ARM extensions available). It's plain text.
NASM (assembler) Открытый код Assemble to an object file: nasm -f win64 file.asm -o file.obj, then link to build an EXE.
MASM (Microsoft Macro Assembler, in Visual Studio) Бесплатно Use ml64.exe (ships with Visual Studio Build Tools) to assemble MASM-syntax .asm files.
macOS3 apps
VS Code / BBEdit Бесплатно Open the .asm to read/edit as text with assembly highlighting.
NASM Открытый код brew install nasm, then nasm -f macho64 file.asm to assemble (link with clang/ld).
GNU as (Xcode command-line tools) Бесплатно Assemble GAS/AT&T-syntax .s/.asm with the as that ships in Xcode CLT; build with clang.
Linux3 apps
GNU as / binutils Открытый код Assemble: as file.asm -o file.o then ld to link; or use gcc to assemble+link in one step.
NASM Открытый код brew install nasm, then nasm -f macho64 file.asm to assemble (link with clang/ld).
Any text editor (Vim, gedit, nano) Открытый код Open the .asm to read/edit - it's plain text.

Технические подробности

глубокая спецификация
File typePlain-text assembly-language source code
MIME typetext/x-asm (also text/x-assembly, text/plain)
Character encodingASCII or UTF-8; legacy DOS sources may use code pages such as CP437
File signatureNone - no magic bytes; identified by extension and content (mnemonics and directives)
Line structureEach 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 size1 KB - 500 KB; generated listing files may be larger
Output artifactAssembled into an object file (.obj / .o), then linked into an executable
Common assembler dialectsMASM, NASM, GNU as (AT&T syntax), TASM, ARM/Keil assembler
Target ISAsx86/x86-64, ARM/AArch64, MIPS, RISC-V, AVR, 6502, Z80, and many others
Dialect portabilityNot portable across assembler dialects without modification; syntax and directives differ significantly
Macro supportSupported in most assemblers: MACRO/ENDM in MASM, %macro/%endmacro in NASM, .macro/.endm in GAS
Include mechanismINCLUDE (MASM), %include (NASM), .include (GAS) - splits source across multiple files
Typical use casesOS 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. Будьте конкретны - укажите вашу систему и версию ПО.
Аккаунт не нужен · ответы обычно в течение дня

Вопросов пока нет - станьте первым, кто спросит о файлах ASM.

Часто задаваемые вопросы

How do I run an ASM file?
You don't run it directly - it's source code. Assemble it with an assembler (NASM, MASM or GNU as) into an object file, then link that into an executable. For example: nasm -f elf64 file.asm -o file.o && ld file.o -o prog.
How do I open an ASM file to read it?
Open it in any text editor or code editor - VS Code, Notepad++, Vim. It's plain text. Editors with assembly syntax highlighting make it easier to read.
What assembler do I need for a .asm file?
It depends on the dialect the file is written in: NASM for NASM syntax, MASM (ml64.exe in Visual Studio) for MASM syntax, GNU as for AT&T/GAS syntax, or an ARM/Keil assembler for embedded ARM. The comment style and directives hint at which one.
Why can't I convert my ASM file to STEP or IGES?
Because that .asm is probably a CAD assembly file (Pro/ENGINEER, SolidWorks), not assembly source code. Those conversions are CAD exports done inside the CAD program. An assembly-language text file cannot become a 3D model.
What's the difference between .asm and .s?
Both hold assembly source. .asm is common on Windows/DOS (MASM, NASM); .s (lowercase) is the conventional extension for GNU assembler / compiler-generated assembly on Unix-like systems. The syntax (Intel vs AT&T) usually differs accordingly.
Is an ASM file a virus?
The file itself is harmless text. It only matters what the code does after you assemble and run it. As with any source code, review unfamiliar assembly before building it.

Ссылки

1GNU as - The GNU Assembler manualsourceware.org
2Microsoft - MASM (ML) referencelearn.microsoft.com

Узнать больше

по всей базе данных

Популярные расширения на этой неделе

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.MDMarkdown Document
4.BINCD/DVD Disc Image (BIN/CUE)
5.PARTPartial Download File
6.RPMSGRestricted Permission Message
7.NOMEDIAAndroid No-Media Marker File
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.ICSiCalendar data file

Похожие расширения

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Бесплатные инструменты для файлов

Идентификатор файлов и конвертер изображений в браузере - все работает на вашем устройстве.

Открыть инструменты

Обзор расширений файлов A-Z