hello sir emerald-monk;
This can be solved by some ways, but I prefer talk to you do that by hands.
I'm not sure what IDE you're using, so, the assemble and link command line are hidden. Do this by hands instead of "build all".
If you're impatience, you can try insert before main proc the line below:
public main
Other thing you can try is remove "main proc" and "endp" and insert in the place of "main proc" the line below:
main:
Can you see that the error link "renamed" your "main" to "_main"? This is probably because the linker is trying to link that as a "c" style in easy words, or ... .
This code is done to ms-dos 16 bits, by default I'm assuming your IDE is trying to assemble and link that to 32 bits.
ps: try what sir jj2007 posted previously.
Good job.