954,152 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Programming .exe files directly

Is it possible to open notepad and type some gibberish and save it as a .exe file and run it? :mrgreen:

chound
Junior Poster
145 posts since Aug 2004
Reputation Points: 15
Solved Threads: 1
 

Can we write machine level code directly??

chound
Junior Poster
145 posts since Aug 2004
Reputation Points: 15
Solved Threads: 1
 

>Is it possible to open notepad and type some gibberish and save it as a .exe file and run it?
If you want to work out the machine code for your system that would be equivalent for a properly assembled executable, then figure out what combination of keyboard characters will give you that machine code...I suppose it might be possible to do this if Notepad doesn't add anything in the process of saving the file as an executable.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

Not in Notepad, no. In a hex editor, maybe with a ton of patience. But an exe generally has a header record and sections with headers before them and the like. Try using DUMPBIN on a small exe and see how much crud is in there.

Using a hex editor you could modify an existing exe, but even that would take more patience than its worth.

That's why the compilers were invented, after all!

Chainsaw
Posting Pro in Training
436 posts since Jun 2004
Reputation Points: 36
Solved Threads: 11
 
Not in Notepad, no. In a hex editor, maybe with a ton of patience.

Does Windows filter the input so much that typing ALT+(ASCII) codes won't produce the right results?

*Nuez goes to check.

Yeah, guess it does. :rolleyes:

Nuez_Jr
Newbie Poster
18 posts since Oct 2004
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You