Draw a flow chart and write a single assembly language program that meets the following
Allow the user to enter a string of up to 100 digit characters (i.e. 0 to 9). You cannot
assume that a character is a digit, so you have to do input validation and ignore (i.e.
skip over) any character that is not a digit. You must echo each digit 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
Once the user has terminated the string, you must loop through the string stored in
memory and count the number of odd and even digits that appear in the string. You
are also required to keep the position of the smallest digit and the largest digit in the
string. In the case of multiple occurrences of the same digit, you must keep the position
of the last of the smallest and the last of the largest digits in the string.
Once the loop has been completed you must display on screen both the number of
odd and even digits, and the positions of the smallest and largest digits (in multi-digit
hexadecimal) with an appropriate message, e.g.:
There were 12 odd and 9 even digits in the string
The position of the smallest digit is 1B, and the position of the largest
digit is 14
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 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 subroutine on the stack. You do not need to
utilise the stack for the last two subroutines.
This question is about motorola 68000 assembly language