Write a MIPS assembly program in the MARS simulator that accepts an input string of size less than 40 characters, applies the following decompression algorithm to the string, and then prints the resulting decompressed string. In the input string, if a "#" is encountered, the next byte is interpreted as a number i between 0-255; the output string would then replace the # and its i with i-32 consecutive occurrences of the character "A" (see examples below). If i=32 , then the output string would replace the # and its i with one occurrence of "#". Similarly, "$" corresponds to multiple occurrences of the character "C"; "%" corresponds to multiple occurrences of the character "G"; "&" corresponds to multiple occurrences of the character "T". For all other encountered characters, the output string should simply reproduce that character. We will only test your code with valid inputs, i.e., strings of under 40 characters and i > 31. Keep an ASCII table handy. See the following examples:
Provide an input of less than 40 characters:
4A2#+96$(XY%"TV&&p$ d
The decompressed string is:
4A2AAAAAAAAAAA96CCCCCCCCXYGGTVTTTTTTp$d
Explanation: "#" is followed by "+", which is ASCII 43, so it was replaced by 11 A's. "$" is followed by "(", which is ASCII 40, so it was replaced by 8 C's. "%" is followed by double-quote, which is ASCII 34, so it was replaced by 2 G's. "&" is followed by "&", which is ASCII 38, so it was replaced by 6 T's. "$" is followed by " " (space), which is ASCII 32, so it was replaced by "$".
Provide an input of less than 40 characters:
ab%%& G#)mn
The decompressed string is:
abGGGGG&GAAAAAAAAAmn
Dear Sir/Madam,
I am good in assembly language programming. I did many coding involving array, stack and custom made data structure in MIPS assembly language in MARS IDE.
I have done couple of coding in freelancer as well like implementation of calculator.
I believe that I am the best suitable for your project. Please award me the project to proceed further.
Regards,
Chhanda
Well, what makes me the best candidate.. Hmm, i have recently done the Architecture course (Computer Organisation) and have done some serious MIPS coding. So I can be your call.