For this lab, you will write an ARM assembly function which will take a character string, and convert it to uppercase. This function will take the character string as its only argument.
It should modify the characters in place, so that after the function is done, the letter characters at that memory address have been changed to capital ones.
You can use the toupper function to achieve this. This function takes one argument - a character - and returns a character which is the upper case version of the one it was passed. If the character passed in was not a lower case letter, then toupper returns it unchanged.
Your function should loop over all of the characters in the array, calling toupper on each of them, and storing them back. When you hit the 0 character, the function should return.
Because we are calling a function from ours, we will have to be very careful of the calling convention so that we can return back, and not overwrite any registers we are not allowed to!
wget cs.umw.edu/~finlayson/class/spring18/cpsc305/labs/uppercase.tar.gz tar xvf uppercase.tar.gz cd uppercase
gbacc uppercase.s main.c
When you are done, your program should produce the following output:
Copyright © 2022 Ian Finlayson | Licensed under a Attribution-NonCommercial 4.0 International License.