Question: Test read _ grid _ width _ S 1 _ 0 ( [ 0 ] read _ grid _ width ( [ 7 , 5

Test read_grid_width_S1_0([0] read_grid_width ([7,5,61,63,24])- failed (Incorrect output)
Your program produced these 6 lines of output:
Calling read_grid_width. ..
Enter the width of the playing field:
error: could not find instruction at 0x0041056c
tip: try using the command - the instruction that brought you here was:
0x00400184459[0x158040fa] bne $t4, $zero, 16634 # bnez $t4, str_read_grid_width_not_multiple
The correct 8 lines of output for this test were:
Calling read_grid_width. ..
Enter the width of the playing field: Bad input, the grid width must be a multiple of 3
Enter the width of the playing field: Bad input, the width must be between 6 and 60
Enter the width of the playing field: Bad input, the width must be between 6 and 60
Enter the width of the playing field: Bad input, the width must be between 6 and 60
Enter the width of the playing field:
Returned from read_grid_width
Checking the value of grid_width: 24
The difference between your output(-) and the correct output(+) is:
Calling read_grid_width. ..
Enter the width of the playing field: Bad input, the grid width must be a multiple of 3
Enter the width of the playing field: Bad input, the width must be between 6 and 60
Enter the width of the playing field: Bad input, the width must be between 6 and 60
Enter the width of the playing field: Bad input, the width must be between 6 and 60
Enter the width of the playing field:
Returned from read_grid_width
Checking the value of grid_width: 24
error: could not find instruction at 0x0041056c
tip: try using the 'back command - the instruction that brought you here was:
0x00400184459[0x158040fa] bne $t4, $zero, 16634 # bnez $t4, str_read_grid_width_not_multipleHi, my MIPS code keeps outputting error message (see in last image). Could you help correct my code so that it is equivalent to the provided C code thanks.
 Test read_grid_width_S1_0([0] read_grid_width ([7,5,61,63,24])- failed (Incorrect output) Your program produced these

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!