Use the code provided in example to generate MIPS32 assembly for a PIC32MX trainer board. 1. Extend the example to cover all 8 leds. There is a function createVars that currently only initilizes LED1. Bring in other leds as well. Leds1..7 just need that initialization. 2. Add an unconditional loop statement (like: LOOP and ENDLOOP or REPEAT and ENDREPEAT) Create new grammar rules for loop and a block of statements inside the loop. There is already an unconditional loop at the end of the program, so you can reuse that example. 3. Port A has been configured as digital, yet the leds are analog devices. Currently writing 1 means that the led is always on at max intensity, 0 means it is off. Pulse-Width Modulation can be used to have intensities between these 2 extremes. The pin controlling a led can be written values 1 and 0 in a loop. Try to set one led to 1 and another led to 1 and then 0 (several times) inside an eternal loop. This is not a convenient approach. Create a DELAY statement that takes a value (eg: "DELAY(75)" or "DELAY 75") and wastes processor time according to that value. You need to create new flex and bison rules for the delay statement. Write assembly code to waste time. Assign the passed value to a register. Add a label. Start decrementing that register (by adding immediate -1). As long as the register isn't zero jump back to label (compare with register 0 that is hardwired to 0). Test the delay statement. 4. Add RGB leds, switches and the ability to read from switches (eg: "SW1 => LED1"). Initialize the switch variables to work as inputs. Change the header file to store whether a variable is input or output. Change the initVars and newVar functions. Create new grammar rule so that switches can be assigned to leds. Write assembly code to read the value of switch from PORTx then AND it with mask. Reading is similar to writing and requires 2 instructions LUI and LW. With AND you can filter for the specific bit. Write assembly code that implements if-then-else statement. If the value read from PORTx is not zero then set led to 1 else set led to 0. 5. We are back to the beginning where a switch either sets a led to completely on or completely off. Add explicit IF statement so that switches could also control intensity of leds.