Hi magnusbbc,
Welcome to the forum!
The way Dr. Carter's stuff is "supposed" to be linked involves "driver.c" - a stub of C code which simply calls "asm_main", and your code will include:
global asm_main
asm_main:
However, your "first.asm" starts with:
global _main
_main:
I think this will work, simply bypassing "driver.c" - but it won't match exactly what it says in the book. Change it to "asm_main" and add "driver.c" to the "linker options" if you care.
As a one-time job, you will need to assemble "asm_io.asm" to "asm_io.obj":
nasm -f win32 -d COFF_TYPE asm_io.asm
then add "asm_io.obj" to the "linker options". Add "driver.c" too, if you're going to do it that way.
I see "$MACROS.OBJ$". I'm not sure what that refers to. You may want to remove it, if SASM complains about not being able to find it. May not hurt to leave it there.
Try something like:
linker options: $PROGRAM.OBJ$ asm_io.obj -o $PROGRAM% -g -m32
or perhaps:
linker options: driver.c $PROGRAM.OBJ$ asm_io.obj -o $PROGRAM% -g -m32
and see if that clears up the errors. You're on the right track, I think. I'm not actually familiar with SASM, but I think I see what it does...
Best,
Frank