First I created the file first.asm from notepad.exe and created its object file using nasm as told in the book. But I think that maybe I need to use object file formats other than coff. There aren't any linker errors. I'll try linking the object files by ld.exe.
Try changing coff to win32. Using Nuwen's MinGW with the Cygwin examples, it worked for me. Here's what I get:
nasm -f coff first.asm
gcc -o first first.o driver.c asm_io.o
nasm -f win32 first.asm
gcc -o first first.obj driver.c asm_io.o
Enter a number: 3
Enter another number: 2
You entered 3 and 2, the sum of these is 5
; my own x86 program
mymsg1 db "Let's see if this works !", 0
mov eax, mymsg1
The error is 'The program myown.exe has stopped working correctly'.
But I got where the code was wrong. It should have been like this at line 9