A preconfigured development environment for x86/x64 NASM Assembly programming on Windows.
Note
The repository includes unmodified executables from the official sources, placed in tools\ for convenience:
- nasm.exe (v2.16.03 Win64) - VirusTotal Report
- GoLink.exe (v1.0.4.6) - VirusTotal Report
If you prefer to download them directly from the official sources, visit NASM and GoLink and replace the files in tools\ as needed.
Tip
For an in-depth guide on assembly language and environment setup, check out my website.
-
Clone or Download the Repository
-
Clone the repository using Git:
git clone https://github.com/tis-starlight/NASM-Starter.git
-
Alternatively, download it as a ZIP file and extract it.
-
-
Write Your Code
- Place your assembly source files in the appropriate directory based on the target architecture:
src\x86\for 32-bit programssrc\x64\for 64-bit programs
- Ensure the source files have the
.asmextension.
- Place your assembly source files in the appropriate directory based on the target architecture:
-
Build the Program
When running commands from the root directory, you must specify the relative path, such as
tools\nasmorscripts\build_x86.bat. However, if you navigate to the appropriate directory first, you can run the command directly, likenasmorbuild_x86.bat.-
Using Scripts (automated assembly, linking, and execution):
# For x86 (32-bit) scripts\build_x86.bat {filename_without_extension} # For x64 (64-bit) scripts\build_x64.bat {filename_without_extension}
You can modify the build scripts as needed. Use
clean.batto remove build artifacts. -
Manual Build Process:
# x64 (64-bit) - Assemble, Link, and Run tools\nasm -f win64 src\x64\hello64.asm -o obj\x64\hello64.obj tools\golink /entry:_start /console obj\x64\hello64.obj /fo bin\x64\hello64.exe kernel32.dll bin\x64\hello64.exe # x86 (32-bit) - Assemble, Link, and Run tools\nasm -f win32 src\x86\hello32.asm -o obj\x86\hello32.obj tools\golink /entry:_start /console obj\x86\hello32.obj /fo bin\x86\hello32.exe kernel32.dll bin\x86\hello32.exe
-
NASM-Starter/
├── .vscode/
│ ├── settings.json
│ └── extensions.json
├── src/
│ ├── x86/ # 32-bit code
│ └── x64/ # 64-bit code
├── obj/
│ ├── x86/ # 32-bit objects
│ └── x64/ # 64-bit objects
├── bin/
│ ├── x86/ # 32-bit binaries
│ └── x64/ # 64-bit binaries
├── tools/
│ ├── nasm.exe
│ └── GoLink.exe
├── scripts/
│ ├── build_x86.bat # 32-bit build
│ ├── build_x64.bat # 64-bit build
│ └── clean.bat
├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE
└── README.md