Well that's "interesting". You get one of those errors with "beroset" in it. The number is just the line number where the error pops up (changed slightly now). Ed Beroset (one of the many people who made Nasm what it is) put that in so we could tell which of several effective address errors caused it. Perhaps more could be done with that to make a more informative error message... someday...
In any case, the line that's causing the problem is:
mov ebx, [input + count]
That isn't what you want to do, but I'm not sure why it isn't a valid effective address. You're adding together the address of "input" plus the address of "count". There's no valid memory at such a large number - it would segfault if Nasm let us do it - but I'm not sure why Nasm won't let us do it. (because it is not a "scalar" - it's a "relocatable value", I guess?)
What you would "like" to do is something like...
mov ebx, [input + [count]] ; input plus [contents of count]
Unfortunately, there's no such instruction. However, by luck or good planning, ecx happens to hold the contents of "[count]". We can do:
mov ebx, [input + ecx]
This assembles without error... but it doesn't quite "work". We're getting four bytes from that address, and comparing it to edx which has a space in the low byte (dl) and the upper bytes clear, so they never quite match. I dealt with this by...
movzx ebx, byte [input + ecx]
It might be easier just to use dl and bl for the bytes you want to compare. Lessee... once we fix the "invalid effective address", Nasm complains that it needs to know the size of the period...
mov byte [input + ecx], 46
... and I think that makes it work! ld complains about not being able to find the entrypoint, but guesses right. ("global _start" and a "_start:" label fix that - could be "commence" if you tell ld "-e commence", but it's easier to use the default "_start". Your entrypoint doesn't need to be the first thing in "section .text" - you can put subroutines first and "_start" later if you want.)
Good job!
For tutorials using Nasm, I like
http://www.drpaulcarter.com.pcasm It uses the C library to allow it to be used on any OS.
Another tutorial was written by one of our regular contributors here, Alfonso VĂctor Caballero Hurtado.
http://abreojosensamblador.net/IndexEn.html It was written in Spanish, but is mostly translated to English. It covers other assemblers besides Nasm, but there's plenty of Nasm in it!
Another place you might look is in the tutorials section at
http://www.asm.sourceforge.net It leans mostly towards Linux/Unix stuff. Some of it is for (G)as, but there's plenty of Nasm there, too.
Best,
Frank