Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In the Settings menu of SPIM set Bare Machine OFF , Allow Pseudo Instructions ON

ID: 3618125 • Letter: I

Question

In the Settings menu of SPIM set Bare MachineOFF, Allow Pseudo InstructionsON, Load Trap File ON, DelayedBranches ON, Delayed Loads ON, Mapped IO ON, QuietOFF.

Run the programs by clicking SimulatorGo and thenOK in the pop-up panel.

Write a program to evaluate 3ab - 2bc - 5a + 20ac -16

Prompt the user for the values a, b, andc. Try to use a small number of registers. Use thestack to hold intermediate values. Write the final value to themonitor.

Printout of program (fromNotepad), screen printout from SPIM showing final values inregisters, screen printout of I/O screen showing result.

Explanation / Answer

Dear, evaluate 3ab -2bc - 5a + 20ac - 16