The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 1 Day Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Translate function f into MIPS assembly language. If you need to use registers $t0 through $t7, use the lower-numbered registers first. Assume the function declaration for func is A????1int f(int a, int b);A????1. The code for function f is as follows:
int f(int a, int b, int c, int d){
      return func(func(a,b),c+d);
}
I usually don't have trouble converting programs into MIPS but I guess I'm not understanding the C code inthe first place hence why I'm strugging.
If you could explain to me what the function is doing and what they mean by "function declaration for func is A????1int f(int a, int b);A????1 in an easy way for me to understand, I would appreciate it. Since I know this involves the stack in MIPS, I wouldn't mind seeing the code or having that explained either since it is the first time I'm messing with the stack.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll