Question: Please write a ASSEMBLY MIPS code ONLY: In the project, you are only required to Convert FIRST and LAST characters of a string to opposite
Please write a ASSEMBLY MIPS code ONLY: In the project, you are only required to Convert FIRST and LAST characters of a string to opposite case, and store back to same location. Ask user for input less than 10 chars, load into register. after covert character, print it.
START CODE: .globl main .data str_prompt: .asciiz "Enter a ASCII string (max 8 characters): " int_prompt: .asciiz "Enter an integer in range +/- 2^16: " int_badinput: .asciiz "Bad Input! " .align 2 inputString: # additional label refering to the same address as 1stChar Char1: .space 1 Char2: .space 1 Char3: .space 1 Char4: .space 1 Char5: .space 1 Char6: .space 1 Char7: .space 1 Char8: .space 1 forNewline: .space 1 forNull: .space 1 .text main: # Your code goes here li $v0, 4 la $a0, str_prompt syscall
la $a0, str_prompt li $v0, 8
HERE IS SAMPLE OUTPUT: Enter a ASCII string (max 8 characters):
String strinG
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
