How to Run NASM on Windows

Download codeblocks from Code Blocks Downloads., Download nasm from netwide assembler. , Install the codeblocks by running the setup.exe file you downloaded. , Extract and install nasm into the codeblocks folder, e.g., C:\Program...

10 Steps 1 min read Medium

Step-by-Step Guide

  1. Step 1: Download codeblocks from Code Blocks Downloads.

    This is a Win32 console program that writes "Hello, World" on one line and; then exits.

    It needs to be linked with a C library. ,, Enter this command: nasm
    -f win32 helloworld.asm.

    It should produce a helloworld.obj file in the same directory. , It should build a file named a.exe. , The words "Hello, World" should display on the screen.
  2. Step 2: Download nasm from netwide assembler.

  3. Step 3: Install the codeblocks by running the setup.exe file you downloaded.

  4. Step 4: Extract and install nasm into the codeblocks folder

  5. Step 5: C:\Program Files\CodeBlocks\MinGW\bin.

  6. Step 6: Check whether the installation is working or not by the source code below for a test run.

  7. Step 7: Save the source code above as helloworld.asm in the location: C:\Program Files\CodeBlocks\MinGW\bin.

  8. Step 8: Run nasmpath.bat.

  9. Step 9: Execute the object file by typing: gcc helloworld.obj.

  10. Step 10: Type a.exe to run the test program and get your result.

Detailed Guide

This is a Win32 console program that writes "Hello, World" on one line and; then exits.

It needs to be linked with a C library. ,, Enter this command: nasm
-f win32 helloworld.asm.

It should produce a helloworld.obj file in the same directory. , It should build a file named a.exe. , The words "Hello, World" should display on the screen.

About the Author

E

Eugene Martinez

Eugene Martinez has dedicated 1 years to mastering non profit. As a content creator, Eugene focuses on providing actionable tips and step-by-step guides.

40 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: