I fixed it by using some directives that I had not been taught when I posted this.
L1:mov eax,0 ; clear upper bits of EAX
lodsb ; AL = [ESI], inc ESI
cmp al,0 ; end of string?
je done ; yes: exit
shl eax,2 ; multiply by 4
inc DWORD PTR[edi+eax] ; add to table entry
jmp L1
done:
My display technique was flawed as well, but since that wasn't part of my question I'll leave it be here so that I may smack myself on the forehead when I come back here.