The Free Pascal project is a modern compiler for Pascal and Object Pascal which comes with a text-mode IDE similar to Borland Pascal 6.0. Get it and read about it at freepascal.org. Or install it on Linux with your package manager:
To work with a pascal source file, first press W and then enter a filename. This is the file that the editor will open and it is also the file that the compiler will compile if you haven't selected a main file.
Regards,
Bert Vingerhoets
vingerh...@hotmail.com
bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them. RE: decompiling .exe files in turbo pascal Fangface816 (Programmer)7 Feb 04 14:18Okay I get it. Thanks for clearing that up.
So theoretically, if you had a preset record of possible variable names for the decompiler to use, and focused the effort on one particular language (C++, for example, would be my choice, as it's very flexible), as well as initially assuming one way or another on the subject of halt or loop, then it would be quite possible to create at least readable source code.
I suppose if the objective was mere functionality, it would be achievable, albeit with a lot of work. Infallible accuracy and reliability is another matter.
This is a very interesting subject. I suppose a lot of people have attempted a decompiler.
Cheers,
Fangface RE: decompiling .exe files in turbo pascal lionelhill (TechnicalUser)8 Feb 04 14:09I'm not sure I agree that a hypothetical decompiler needs to identify whether a program is going to get stuck in an infinite loop or not. People manage to write code that (sometimes) crashes without knowing that it's going to, or when! But I agree that decompiling, unlike compiling, is more to do with psychology and guesswork than an exact translation. Decompiling could involve guessing the function of the code in the sense that you'd like to know something is a loop-counting variable before you give it a name like "OuterLoopCount". How you go about guessing what variable keeps the score (and calling it "score") in a space invaders game I don't know.
RE: decompiling .exe files in turbo pascal Bertv100 (Programmer)8 Feb 04 15:11I said that a decompiler should be able to know what a program does to produce accurate code. A program that can decide what another program does, just by looking at it, is closely related to the halting problem. And even when the program to decompile is executed to see what it does, it's not guaranteed any usable result will be produced, because the decompiler cannot know what input it expects. Regards,
Bert Vingerhoets
vingerh...@hotmail.com
bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them. RE: decompiling .exe files in turbo pascal lionelhill (TechnicalUser)9 Feb 04 04:36true! RE: decompiling .exe files in turbo pascal Fangface816 (Programmer)10 Feb 04 16:28I see. I misunderstood. RE: decompiling .exe files in turbo pascal Fangface816 (Programmer)10 Feb 04 17:45So the halting issue you mentioned would NOT be need to be addressed in order to have a successful decompiler. This whole subject has gotten me very interested. What language do you think a decompiler would best be written in? (Not that I'm going to try it, I was just wondering about opinions)
Cheers,
Fangface RE: decompiling .exe files in turbo pascal Bertv100 (Programmer)10 Feb 04 18:26The halting problem is not a problem, it's the name for a theorem and its proof. I mentioned it because it is related to the problem of creating an accurate decompiler. The point I'm trying to make is that it is virtually impossible to produce a program that restores a binary file into its source code representation. This, however, is an opinion; true, one that is shared with quite a lot of traditional and conservative thinkers. Great leaps in science, on the other hand, have been achieved by people who didn't hold with classic thinking and went their own way.
I won't withhold you from trying to build your decompiler, all I say is that will not be easy. Regards,
Bert Vingerhoets
vingerh...@hotmail.com
bvingerh/
Don't worry what people think about you. They're too busy wondering what you think about them. googletag.cmd.push(function() googletag.display('div-gpt-ad-1406030581151-2'); ); Red Flag This PostPlease let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.
CancelRed Flag SubmittedThank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.