One of your comments that doesn't seem to exist anymore did mention that you had Dev-Cpp on installed on your Windows. If you have the Dev-Cpp MinGW bin directory on your path, then the GNU Linker LD is available to you.
I don't know if you are using a 32-bit or 64 GCC with Dev-Cpp, but this should work for both to generate a 32-bit executable:
nasm -f win32 ass.asm -o ass.obj
ld -mi386pe -o ass.exe ass.obj
That will tell NASM to generate a 32-bit Win32 object, and LD will link the object to an i386pe 32-bit Windows executable.
Alternatively you could download the the GoLink linker. Once you extract it onto your path you could do something like:
nasm -f win32 ass.asm -o ass.obj
GoLink.exe /console ass.obj kernel32.dll user32.dll gdi32.dll
You may have to specify your code entry point (label) with something like:
GoLink.exe /console /entry _start ass.obj kernel32.dll user32.dll gdi32.dll
Where _start
could be the label where you expect your program to start. You don't need any of the DLL's listed if you aren't calling any of the Win32 API.
If you aren't creating a console application then you can leave off /console