Only preserve R11 on the stack!

In your Quiz04, only preserve R11 on the stack. In particular don’t preserve R14, since is the output register according to the contract. If you preserve it (push in on entering the subroutine and then pop on return) then you will clobber your output and won’t get any output when you return from the subroutine. So, only preserve R11 in your subroutine, no other registers.

Names in the Memory Browser

Names appear in the memory browser only if you have a PC and you have downgraded your compiler.

See the following documents on our website (Lessons tab). It was covered in some early screencast, forgot which one.

Downgrading Compiler

UpgradingTheCompiler_ForMacUsers

In my opinion, it is not worth the trouble to downgrade the compiler. First, you can only do it if you have a PC, second, all it gives you is that you can see the names of the variables in the memory browser. The cost is that you are using a very old compiler without the latest patches and updates.

About Log2 in Quiz04

You can not calculate Log2 in your assembly code.  In your main program, just used the value of Log2 as input to the subroutine. So, if you want to divide by 8 then just enter 3 as input (Since Log2(8) = 3)

Quiz04 has been posted

Due Date, Sunday, April 4, 11:59pm.
You have plenty of time (10 days) to do this quiz, don’t leave it to the last moment. Many students again waited till the last day to do the midterm, and I had a swarm of emails during the weekend, mostly last minute emails on Sunday. So for this quiz, emails during the weekend of Saturday, April 3, and Sunday, April 4, will not be answered. Start working on the quiz now.