CIS 351 |
Lab 6: Branches |
Fall 2018 |
For this lab, you are going to write and test some assembly
code using branches. As with previous assignments, in order for your
solution to work with my MUnit tests, you must follow
these rules:
.globl.a0, a1, and a2.
a0 will contain the first parameter, a1
the second, etc.
jr $ra.1 for true and 0 for false.You may use this class as a
starting point for your MUnit tests.
Be sure to document and comment your code!
When your code passes all tests, submit the
.asm file and MUnit test file using Blackboard's Assignment
Manager. Call me over, and I will run your code against my tests. (Your code needs to be in the EOS environment
for me to do this.)
!a0, do the following:not $a0, $a0andi $a0, $a0, 1andi instruction makes sure that only the least-significant bit has a value other than 0.)
If you are looking for more assembly coding practice, consider these CodingBat problems:
Updated Saturday, 13 October 2018, 3:30 PM