Question: Task #1: Write a MIPS assembly program that reads the size (n) of the message from the user. Then, the program allocates (n+1) bytes in

 Task #1: Write a MIPS assembly program that reads the size
(n) of the message from the user. Then, the program allocates (n+1)

Task #1: Write a MIPS assembly program that reads the size (n) of the message from the user. Then, the program allocates (n+1) bytes in the heap. After that, read a string of n characters from the user he/she wishes to encrypt. Next, read an encrypting key (e) from the user [1, 25). Encrypt the original string with the encryption key using the following code. Finally, print out the encrypted string. for if Tiguppe (ch)) { it ichi) ch ch else if (islower (ch)) ch if (ch ch 267 ltr[i] = ch; Sample Run: Enter n: 11 Enter string: Hello World Enter e: 13 Encrypted String: Uryyb Jbeya Caesar Encryption Algorithm for (i=1;i OXA) ch ch - 26; Task #1 Write a MIPS assembly program that reads the size (n) of the message from the user. Then, the program allocates (n+1) bytes in the heap. After that, read a string of n characters from the user he/she wishes to encrypt. Next, read an encrypting key (e) from the user [1, 25). Encrypt the original string with the encryption key using the following code. Finally, print out the encrypted string. Sample Run of the task Enter n: 11 Enter string: Hello World Enter e: 13 Encrypted string - Uryyb Jbeya else if (istowor (ch)) th = c + 3; if (ch > 0x71) chch 26; str[i] - chi

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!