Question: We've defined a function that rolls dice called roll, which returns a number 1 - 6 . Your task is to write an ABI -
We've defined a function that rolls dice called roll, which returns a number
Your task is to write an ABIcomplaint function sumdice in nios assembly that takes as a single argument the number N and calls roll N times, and returns the sum of all the returned rolls. For example, if you are given that N you should call roll twice. If the first roll returns and the second returns your function should return
The Cfunction prototype should look like unsigned int sumdiceunsigned int N; though you must write the function in assembly!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
