2
我真的需要这个帮助。我正在尝试创建一个将所有小写转换为上部的函数。 例如:“大家好!” - >“大家好MIPS:小写字母
这是我迄今为止(我知道这是不是很多,但我只是不知道如何从搬到这里,一直试图小时)
to_upper:
#PSEUDOCODE:
# load byte
# send to the ASCII-function
# check if the ASCII is a upper or lower
# store/save is somewhere - if upper
# if lower, subtract 20 in hexadecimal and then store it together with the other upper
# print back
#### MY CODE:
la $t0, STR_str
j check_if_upper
check_if_upper:
lb $t1, 0($t0)
ble $t1, 96, is_upper
j is_lower
is_upper:
is_lower:
exit_to_upper:
jr $ra
完美太谢谢你了。!d – Aewend