Answer:

MULT: MOV 6(R6), R0  ; y
      BNE CONT
      RTS R7         ; return y, which is 0
CONT: DEC R0
      MOV 4(R6), -(R6) ; push x
      MOV R0, -(R6)  ; push (y-1)
      JSR R7, MULT
      ADD #4, R6     ; pop args
      ADD 4(R6), R0  ; mult(x, y-1) + x
      RTS R7


[exam] [CSC 258 additional problems] [main course page]