Starting from:

$30

CSCI231 Lab 8-Solved

1. Implement a procedure circleRainbow in MIPS assembly language that draws a circle (note that it should draw, not fill a circle). The procedure should take the x and y coordinates of the center of circle (in $a0 and $a1), the radius (in $a2), and the color of circle (in $a3) as inputs. The signature of this procedure in a high level language would look like this: void circleRainbow(int x, int y, int radius, int color).

In your program, call this procedure in a loop to draw several circles. At each iteration the radius of a circle should be reduced by 1 and the color should be changed to another color. You can start your loop with a radius of 15 and stop when radius = 6. That is, you need to draw 10 circles.

Set both the width and height of your display to 64. Set the center of your circles to (32,32). In your Bitmap Display tool set Unit Width, Unit Height, Display Width, and Display Height to 4, 4, 256, and 256, respectively.

More products