Converting C code to DLX assembly code

This is a discussion on Converting C code to DLX assembly code within the C Programming forums, part of the General Programming Boards category; Hi Everyone, Can someone help me and give some guidance, on how to convert C code to DLX assembly code? ...

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    1

    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.

    Thanks.

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Most compilers have an option to output assembly (under GCC, I think the command switch is "-S").
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            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
    Location
    TX
    Posts
    2,058
    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, 11:00 PM
  3. converting c code to c++, the foreach statement
    By hwttdz in forum C++ Programming
    Replies: 2
    Last Post: 07-12-2006, 12:03 PM
  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21