Question: c. Draw vertical lines Write the drawvertical procedure. It is similar to the previous procedure, except it draws a vertical line Requirements: drawvertical must use

 c. Draw vertical lines Write the drawvertical procedure. It is similarto the previous procedure, except it draws a vertical line Requirements: drawverticalmust use the standard MIPS procedure conventions that were shown in classdrawvertical must be implemented using recursion You may assume you are not

c. Draw vertical lines Write the drawvertical procedure. It is similar to the previous procedure, except it draws a vertical line Requirements: drawvertical must use the standard MIPS procedure conventions that were shown in class drawvertical must be implemented using recursion You may assume you are not given arguments that would draw off-screen b. Draw horizontal lines Write the drawhorizontal procedure. You must fill in the drawhorizontal procedure in draw.asm. This procedure takes 4 arguments: a starting x, a starting y, length, and RGB color and draws a line on the Bitmap Display by storing values to memory Requirements: drawhorizontal must use the standard MIPS procedure conventions that were shown in class drawhorizontal must be implemented using recursion. . .You may assume you are not given arguments that would draw off-screen d. Draw squares Write the drawsquare procedure. This procedure takes 4 arguments: a starting x, a starting y, side length, and RGB color and draws a square on the Bitmap Display by storing values to memory. (x.y) (x+length,y+length) Requirements: drawsquare must use the standard MIPS procedure conventions that were shown in class drawsquare must call drawvertical and drawhorizontal to draw the sides You may assume you are not given arguments that would draw off-screen Finally, implement the function int countPixels(color) It returns the number of pixels on the screen of the given color. You will use recursion to implement this function. However, with the only parameter being color, it isn't (reasonably) possible to call it in a way that gets closer to the base case. Instead, you will need a helper function that is able to keep track of which pixel is currently being counted. Requirements: countPixels must use the standard MIPS procedure conventions that were shown in class countPixels must call countPixelsHelper exactly once countPixelsHelper must be recursive c. Draw vertical lines Write the drawvertical procedure. It is similar to the previous procedure, except it draws a vertical line Requirements: drawvertical must use the standard MIPS procedure conventions that were shown in class drawvertical must be implemented using recursion You may assume you are not given arguments that would draw off-screen b. Draw horizontal lines Write the drawhorizontal procedure. You must fill in the drawhorizontal procedure in draw.asm. This procedure takes 4 arguments: a starting x, a starting y, length, and RGB color and draws a line on the Bitmap Display by storing values to memory Requirements: drawhorizontal must use the standard MIPS procedure conventions that were shown in class drawhorizontal must be implemented using recursion. . .You may assume you are not given arguments that would draw off-screen d. Draw squares Write the drawsquare procedure. This procedure takes 4 arguments: a starting x, a starting y, side length, and RGB color and draws a square on the Bitmap Display by storing values to memory. (x.y) (x+length,y+length) Requirements: drawsquare must use the standard MIPS procedure conventions that were shown in class drawsquare must call drawvertical and drawhorizontal to draw the sides You may assume you are not given arguments that would draw off-screen Finally, implement the function int countPixels(color) It returns the number of pixels on the screen of the given color. You will use recursion to implement this function. However, with the only parameter being color, it isn't (reasonably) possible to call it in a way that gets closer to the base case. Instead, you will need a helper function that is able to keep track of which pixel is currently being counted. Requirements: countPixels must use the standard MIPS procedure conventions that were shown in class countPixels must call countPixelsHelper exactly once countPixelsHelper must be recursive

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!