I have this question that i am unable to solve at all... can anyone please help urgently!!!
Draw a flow chart and write a single assembly language program that will meet the following requirements:
Allow the user to enter a string of up to 100 characters. You must echo each character to the screen and store it in memory as it is typed. The user will press Enter to terminate the input (INCH returns cr in this case). You must terminate the string in memory with a null character.
Once the user has terminated the string, you must loop through the string stored in memory and count the number of words that appear in the string. For the purposes of this count, a word is defined as any series of alphanumeric characters (a–z, A–Z and 0–9).
E.g. ‘Fred can, run!?!’ contains 3 words (‘Fred’, ‘can’ and ‘run’).
E.g. ‘What’s that’ also contains 3 words (‘What’, ‘s’ and ‘that’).
E.g. ‘$AU 123.466’ also contains 3 words (‘AU’, ‘123’ and ‘466’).
You are also required to keep the position of the first character of longest word in the string. In the case that multiple words are of the same length, you must keep the position of the first occurrence of a word of that length. E.g. ‘This is a short word’ must maintain a pointer to ‘short’. E.g. ‘A long sentence contains long words’ must maintain the first position of ‘sentence’.
Once the loop has been completed you must display both the number of words (in multidigit hexadecimal) and the longest word on the screen with an appropriate message, e.g. There were 3 words in the string.
The longest word was: fred
You are required to make use of subroutines and parameter passing for this assignment. At a minimum you must have subroutines to perform the following tasks:
· print a string of characters at a passed memory address (terminated with a null character)
· print an integer in multi-digit hexadecimal
· print a single character to the screen (OUTCH)
· retrieve a single character from the keyboard (INCH)
You must pass the parameters to the first two subroutines on the stack. You do not need to utilise the stack for the last two subroutines.
Thanks to who will help me and really appreciate it if you could please email me at email@example.com
thanks heaps agian.