Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions