|
Subject:
|
CAN SOMEONE PLEASEEE HELP ASAP!
|
|
Posted By:
|
bravooo
|
Post Date:
|
11/13/2006 9:12:34 AM
|
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:
Requirement 1: 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.
Requirement 2: 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’).
Requirement 3: 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’.
Requirement 4: 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
Requirement 5: 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 jtmarcus@tpg.com.au thanks heaps agian.
|
|
Reply By:
|
bravooo
|
Reply Date:
|
11/16/2006 6:28:40 PM
|
Is there any out there that can help..... plzzzzzzzzzzzzzzzz!
|
|
Reply By:
|
steven_wort
|
Reply Date:
|
12/1/2006 3:44:52 PM
|
You dont provide enough info, and asking for help with your course homework isnt really a good use of the forum.
What processor does this need to run on, what environment (OS) does it run under, and what assembler are you using are three important questions you havent provided answers to.
Steve Wort Co Author "Professional SQL Server 2005 Administration"
|