Question: Create a MIPS program that will print the reversal of a string using a stack. You need to push the characters onto the stack and
Create a MIPS program that will print the reversal of a string using a stack. You need to push the characters onto the stack and then execute pops to obtain the characters in reverse order. Use instructions sw, and lw to push and pop. Stack pointer should be decremented or incremented by 4 accordingly.
Sample:
.global _start .text _start: # please reverse the given string by pushing and popping it using a stack .data string: .asciiz "Reverse this text!"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
