InterviewSolution
Saved Bookmarks
| 1. |
Solve : I want to look at the source code for calculator.? |
|
Answer» ...for windows. Can I do this? I'm curious to see what it looks like. But, don't I have to download a special program to view this code?Quote from: Doug on April 26, 2010, 09:00:10 PM ...for windows. Can I do this? I'm curious to see what it looks like. But, don't I have to download a special program to view this code? You can't view the source code. but you can dissassemble it. Calculator, like most of windows, was written in C/C++; the C/C++ is translated to machine code by the compiler; all that is left in the result is machine code, no trace of the source. If you REALLY want to see the source you could try to get a development job WORKING at Microsoft. The nest best thing is the disassemble it. while debug is included with most Windows installations, I was unable to automate the disassembly and make it display the whole problem. a better idea is to download the windows SDK (don't worry, that one will still work with XP) and use the "dumpbin" tool. Once you have it installed, issue the following command at the prompt: Code: [Select]dumpbin /disasm %systemroot%\system32\calc.exe >> calc.asm this will dissassemble the file to calc.asm. you can now peruse calc.asm at your leisure, but unless you have some experience with assembly it will just look like a mash of numbers and a few instruction names. Quote from: Doug on April 26, 2010, 09:00:10 PM ...for windows. Can I do this? I'm curious to see what it looks like. But, don't I have to download a special program to view this code?calc.exe is closed source. you can't really look at it. A calculator can be easily done with a programming language. Most programming language already is capable of doing maths. What you just need is to learn how to do up the GUI INTERFACE. Then tie each button you create to do arithmetic at the back end. here's something. try to turn HTML into vb. go to javascriptkit.com and look for graphical calculatorIt's quickly gotten over my head. I was hoping by seeing something small and simple like calculator that maybe I could get some insight into windows. There was a learning version of calc that looked like calc. It was bundled with a version of Visual Basic. Here is one that looks like how I remember it. http://groups.engin.umd.umich.edu/CIS/course.des/cis400/vbasic/vbcalc.html |
|