ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi! I've been wondering if something like reversed compiling can be done to actually get the source code of a program. I tried win32 disassembler but got just lots of non understandable lines....
When you disassemble an executable, the generated code is usually assembly language. There are some disassemblers which generate C, but a) it is not going to be the original code b) is not going to be object-oriented or well-organized c) will not be documented and d) will not be much more readable then assembly.
Source code is not included in an executable. Executables consist of either object code or machine code. Remember: when a compiler runs, it may take a reusable module, and compile it in such a way that for performance optimization the generated modules are repeated throughout the executable, to help the processor reduce cache misses. Also, loops are often flattened out ("unrolled") -- again, for the same reason - so the CPU(s') cache(s) can keep looking forward in a linear fashion rather than incur a cache miss and resultant pauses while the MMU goes out to main memory to fetch the required data.
ohh...well thank you both for answering. I thought it would be a good way of finding functions and answers to the famous 'how did they do this!??' for instance I have a free software to automatically shutdown the computer (power off; runs in windows xp) so I expected to read the actual lines where it sends this command but as you well said it, I only get assembly code...
Thanks again
There is an API to shut down Windows - go to msdn.microsoft.com and you can look it up. Also there may be a package on codeproject which will do what you want. There are plenty of timer and alarm projects on there (some may even be VB!) so all you need do do is use one of the timers, store the time at which you want to shut down, and call the API at that time. It should be fairly straightforward.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.