function 0Ah of interrupt 21h gets a string of chars input from a user. In the second byte of the returned string, it will give you the number of characters in the string, less the enter key.
As for the number of words, a very simple solution could be counting the number of spaces in the string and adding one. Kindof like:
You could count the spaces by going through the string character by character in a loop, doing a compare to 20h (the space character), and jumping on zero to increment a register. When you exit from the loop, add one more to the register, and you'll have the number of words.
Hope this helps.....
Simplicus
**186,000 miles per second. . . not just a good idea, it's the LAW!