Assembly Language Irvine32.inc

Write a program that counts the number of the given character in a user given string. The program must have a procedure called 'HowMany ' that will expect ECX hold the number of user given character in the string buffer, ESI to have the address of where the buffer starts, and EAX to have the character to look for (actually in AL). This procedure will set EAX (return to main via EAX) the number of characters (one given in AL) found in the buffer. The main procedure will ask the user for a string and put it into the buffer (buffer BYTE 256) and then ask the user for a single character (the character to find count of in buffer) and store it in EAX (AL); It will then call HowMany and then lastly, will write out the number of the character found the string.
Things to remember:

  1. Prompt user for input and use ReadSting and ReadChar for input.
  2. ReadString sets EAX with the number of character read in (you will want to use this to set ECX)
  3. The register ECX, ESI, and EAX are to be set in main before this procedure is called.
  4. EAX must be set (and not restored via a USES) in the HowMany procedure
  5. Your HowMany procedure must be commented (Description, Receives, Returns, and Requires) and you must format your code well (e.g. indentations)
    First get your procedure to count the number of set character in a set string
    For example 'o' and 'The quick red fox jumps over the lazy brown dog';