mflo $8
The instructions mflo
and
mfhi
are used to get the results of an integer divide.
For
this example say that we wish to calculate
(y + x) / (y - x)
.
The argument x
is in $8
; y
is in $9
.
The quotient is to be placed in $10
and the remainder in $11
.
Assume two's complement integers.
Here is the program.
Sadly, it has some holes:
Fill in the holes.