Question: Flip Image in MIPS Template: flipper.asm Read the data in test1.txt into the specified buffer. The data read into the buffer should now be converted

Flip Image in MIPS

Template: flipper.asm

Read the data in test1.txt into the specified buffer.

The data read into the buffer should now be converted to consecutive integers and then stored in a 2D array of length 24 7, i.e., one that has 24 columns and 7 rows. However that 2D array will actually be represented as a 1D array*. Finally, take care to convert the entries in the buffer (which are in ASCII) to their numerical values in base 10.

Write a procedure named flip.

Argument structure outlined in template.

* Normally, in a language like Java, we would simply specify the respective array positions of i and j. That is, we would let i represent the row we are currently at, and j represent the column we are currently at. In MIPS, however, our 2D array is stored as values in a 1D array. It is clear to see that for any position [i,j] in our 2D array, we can retrieve this position by simple computing ( i * width ) + j. Since i represents rows, whenever we add a width (for this assignment, width is 24) we are essentially going to the next row in our conceptual 2D array. j simply represents which column we are currently looking at.

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!