CIS 351 |
Lab 6: Branches |
Winter 2021 |
For this lab, you are going to write and test some assembly code using branches. You may want to watch first.
As with previous assignments, in order for your
solution to work with my MUnit
tests, you must follow
these rules:
branches.asm
..globl
.a0
, a1
, and a2
.
a0
will contain the first parameter, a1
the second, etc.
jr $ra
.1
for true
and 0
for false
.This GitHub Classroom repository has a file you can use as the
starting point for your MUnit
tests.
Be sure to document and comment your code!
When your code passes all tests, commit your code with [Grade Me]
in the message.
!a0
, do the following:not $a0, $a0
andi $a0, $a0, 1
andi
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 Sunday, 14 March 2021, 4:27 PM