Question: Hey, can this be done using MIPS. The functionality of your program will support the following: All pixels should be in the range x in
Hey, can this be done using MIPS.
The functionality of your program will support the following:
-
All pixels should be in the range x in [0,128) and y in [0,128) (the parenthesis means not including 128).
-
Pixels start from (0,0) in the upper left to (127,127) in the lower right.
-
Pixel values are referenced in a single word using the upper and lower half of the word. So, for example, 0x00XX00YY) where XX and YY can be 0x00 to 0x7F.
-
All colors should be RGB using a single 32-bit word where the top byte is zero. So, for example, 0x00RRGGBB where RR, GG, and BB can be 0x00 to 0xFF.

***** # draw_pixel: Given a coordinate in $a0, sets corresponding value in memory to the color given by $al # # # Inputs: $a0 = coordinates of pixel in format (OxooXXOOYY) $a 1 color of pixel in format (OxOORRGGBB) Outputs: No register outputs tt draw_pixel: nop # YOUR CODE HERE, only use t registers (and a, jr $ra v where appropriate) ***** # draw_pixel: Given a coordinate in $a0, sets corresponding value in memory to the color given by $al # # # Inputs: $a0 = coordinates of pixel in format (OxooXXOOYY) $a 1 color of pixel in format (OxOORRGGBB) Outputs: No register outputs tt draw_pixel: nop # YOUR CODE HERE, only use t registers (and a, jr $ra v where appropriate)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
