hi there! i cant figure out how i could program a little function in assembly using the PCSPIM environment.
the function i want to program with recursion is:
func(n) = func(n-1) + (n-1)
this is similiar to the fibonnaci function which is:
fib(n) = fib(n-1) + fib(n-2)
and the code for the fibonnaci can be found here:
how can i change in order to make it work with:
func(n) = func(n-1) + (n-1)
i tried plenty of times but i find it hard! all help will be greately appreciated!
thanks! :)