Thread: abs file

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

    abs file

    Hi,
    I have an *.abs file, that is a compiled C program.
    I know this is a silly question, but is there a way to obtain the C source code for this file?

    Thank you very much!

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Yup, if you do me the favour of inventing a machine that can separate cake into eggs, flour, sugar and water, I'm sure soon after someone will come up with a reverse compilers...

    Honestly, yes, it's possible to create something that is C code, but it will NOT be the source-code of the application as it was written. It may be a bit more readable than the disassembled assembler, but it's certainly nothing like C code that any human would have written, and it certainly won't be a good basis to extend/change the application. If the code is optimized, the compiler will have "scrambled" the instructions to improve the performance, which means that something that looks reasonable to a human in source code, like this:
    Code:
    x = 1;
    y = 2;
    a = 100; 
    b = 200;
    would perhaps come to:
    Code:
    v1 = 100; 
    v2 = 1; 
    v3 = v2+1;
    v4 = 2 * v1;
    But that has a completely different meaning in a bigger picture - but the compiler decided that it would make that change.

    Data structures will most likely be lost, as will variable names.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    Quote Originally Posted by Canario View Post
    Hi,
    I have an *.abs file, that is a compiled C program.
    I know this is a silly question, but is there a way to obtain the C source code for this file?

    Thank you very much!
    E-mail the author of the .abs file
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sequential file program
    By needhelpbad in forum C Programming
    Replies: 80
    Last Post: 06-08-2008, 01:04 PM
  2. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  3. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM
  4. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM