linux nasm assembly prints out random characters

I am writing a program to get an integer from the user, and then print out all the numbers from 0 up to the number. My code gets the input fine, but when printing it out, it prints continuously in what seems to be an endless loop. Here is my code:

Display "Enter a number: " Read in an integer less than 32 bytes in size. Set a counter variable to the ASCII value of zero Loop: Display the character, adding 1 to it, and checking to see if it is equal to the value inputted. If it is equal, goto the exit section and exit Else loop.

Why does it loop continuously? I have incremented the counter, and compared the input and the counter, so why doesn't it break?