Thread: Converting C code to DLX assembly code

  1. #1
    Registered User
    Join Date
    May 2010

    Converting C code to DLX assembly code

    Hi Everyone,

    Can someone help me and give some guidance, on how to convert C code to DLX assembly code? I have been trying to find some tool, whatever I find converts from C to MIPS assembly code.


  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Waterloo, Texas
    Most compilers have an option to output assembly (under GCC, I think the command switch is "-S").
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

  3. #3
    Registered User
    Join Date
    Oct 2008
    Depends on the compiler and the host environment. As noted the "-S" option will do the trick on a resident compiler if the host is a MIPS machine, else you need a cross compiler.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Converting C into MIPS Assembly
    By clag in forum C Programming
    Replies: 5
    Last Post: 02-13-2010, 07:48 PM
  2. Replies: 2
    Last Post: 06-02-2008, 10:00 PM
  3. converting c code to c++, the foreach statement
    By hwttdz in forum C++ Programming
    Replies: 2
    Last Post: 07-12-2006, 11:03 AM
  4. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  5. How can I incorporate Assembly code in my C++ program.
    By bman1176 in forum C++ Programming
    Replies: 4
    Last Post: 12-22-2001, 10:58 AM