Monday 15 July 2013

Tryig to translate C code to MIPS assembly to work on spim -


I have written a code for factual computing on C, but I want to translate it into assembly language to work on PCSPIM I am trying but how do I think ?? Can anyone help please?

C code:

  #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; #include & lt; String.h & gt; Zero Genesis (long argument, long * result) {if (logic & lt; 2) {printf ("% ld", * result); } And {long before = argument - 1; * Result = * Result * First; Logic = first; White (logic, result); }} Int main () {long argument, answer, * result; Printf ("factorial"); Scanf ("% ld", & amp; logic); Results = & amp; answer; * Result = Logic; Printf ("% ld! =", Argument); White (logic, result); } SPIM is an MIPS interpreter, therefore you must write those processes to the MIPS assembly. 

.. you

gcc-s

, which produces assembly representations, though I suspect this architecture is limited to the GCC (potential X86.x86! = MIPS) Are running

A few weeks ago, when I had to write an MIPS assembly for my basic principles, I used the Wikipedia article and the following websites heavily:


No comments:

Post a Comment