Thread: C code understandings conversion to assembly (MIPS)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2024
    Posts
    25

    C code understandings conversion to assembly (MIPS)

    Hi ,
    I totally understand the recursion in C programming and now trying more further to understand what is going behind the scenes , so trying please to have the conversion on assembly language for this chunk of code ( just for more understandings not more ) .

    C code is :

    Code:
    int divide(int a)
    {
       if ( a > 1 )
       {
         return divide(a/2);
        }
       return a;
    }
    Could anyone please help me for conversion this code to assembly language?
    like normally Im not programming on assembly language and learnt it long long time ago but trying to understand only
    the recursion part how it's done on assembly behind.


    thanks much
    Last edited by AkamiKhmenisky; 02-01-2024 at 11:50 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ to MIPS Assembly: how to approach
    By primoriscruor in forum C++ Programming
    Replies: 3
    Last Post: 11-29-2012, 08:46 AM
  2. MIPS Assembly Bubble Sort
    By cornfeller in forum Tech Board
    Replies: 17
    Last Post: 06-16-2012, 08:09 PM
  3. convert c programm to mips assembly
    By mariakat in forum Tech Board
    Replies: 8
    Last Post: 02-14-2011, 08:39 PM
  4. Converting C into MIPS Assembly
    By clag in forum C Programming
    Replies: 5
    Last Post: 02-13-2010, 07:48 PM
  5. A question of the MIPS assembly program
    By ok_good in forum Tech Board
    Replies: 0
    Last Post: 05-03-2006, 10:13 PM

Tags for this Thread