Well, you definitely don't want to use the Segmented linker, this is for 16bit code. Continue using the Incremental Linker Version 5.12.8078
So, your getting an obj file? That is what ML.exe does. It is the MASM Assembler and it will Assemble your code into an obj file that you pass to the linker of your choice to create the exe. I say the linker of your choice, since there are a few linkers that you can use all with their own pros and cons.
To create an object file: ml /c /coff /Cp sample.asm
The /c
option tells ml to Assemble only and not attempt to link
The /Cp
option tells ml to preserve the case of all identifiers
/coff
creates the obj file in the Common Object File Format, this is what we use for x86 on Windows.
Now, you need to link the obj file into the exe: link /subsystem:windows sample.obj
/subsystem:windows
creates a GUI Windows exe. Change to console
to create a console based app (NOT the same as a DOS app)