Re: Linked program wont run.
You know, I don't have experience with NASM, but I'll try to help you, though.
This obviously is a DOS program, so you should run it from a command prompt. It should run then, if you change the register used to load the string pointer to from EDX to DX, as it's for a 16-bit environment. (It might even run without that change, as operand size overrides are supported it the real mode that this is to be run in and the most significant 16 bits of EDX that are not used by the DOS function call are all zeroes anyway. But you still should change it, though.)
In addition you have to build a 16-bit EXE file from the object file. I suppose Windows would mistake it to be a Windows program if you link it to the PE format normally used nowadays. My MASM has a special tool named link16 for that purpose; I don't know how to tell the MinGW linker to do that.
Moreover, programs like that are usually placed in COM files (tiny memory model) instead of EXEs. When I wanted to build such a file in old DOS days, I used a tool named exe2bin to convert the EXE output by the linker to COM format. The link16 I have seems to have an option named /tiny for that purpose, but I didn't try it. To be able to convert the program to the COM format, it would need an additional org 0100h directive before the start: label (again at least in MASM...).
If you want to keep the program in EXE format, access to the string might be problematic the way it is now, as I'm not sure how the DS register would be set up in this case. I would recommend anyway for use in an EXE file to put the string data into a separate (default) data segment. At least that's cleaner style (which I must admit isn't really that important for a "hello world".)
HTH :cool: