Which files are needed to run assembly program? Where has to save this program? How this program will run? From where can I get those files?
Thanks,
Abhishek Anand.

Dani AI

Generated

Short practical roadmap (builds on and ): assembly source is just a plain-text file (commonly .asm or .s). Save it anywhere you like — open a terminal/command prompt in that folder and run the assembler, then the linker to produce an executable. Which tools and exact commands depend on your OS, the assembler syntax (Intel vs AT&T), and the object-file format (ELF, COFF, Mach‑O).

A minimal Linux x86-64 workflow using NASM:

nasm -f elf64 hello.asm -o hello.o
ld hello.o -o hello
./hello

If you prefer GCC to resolve runtime/startup issues or PIE-related linking, link with gcc hello.o -o hello instead.

A simple Windows approach (NASM + MinGW) or use MASM as suggested:

nasm -f win32 prog.asm -o prog.obj
gcc prog.obj -o prog.exe

Common pitfalls and quick checks:

  • Match formats and bitness: -f elf64 vs -f elf32 vs -f win32/-f win64. A mismatch causes “file format” errors.
  • Ensure you declare the entry symbol the linker expects (global _start for raw ELF _start, or define main if linking with C runtime).
  • Inspect object/executable with file, objdump -d, or readelf -h to verify architecture and sections.
  • On Linux install tools via package manager (for example, sudo apt install nasm binutils). On Windows, use MinGW-w64 or Visual Studio tools for MASM.

For assembler downloads and docs see the official NASM site NASM and GNU binutils GNU Binutils.

Recommended Answers

All 2 Replies

>Which files are needed to run assembly program?
You need an assembler and possibly a linker to turn your program into an executable file. Assembly source is just a text file, there's nothing special about it until you assemble it into machine code.

masm32.com has all the resources you need to get started

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.