How to write and executable Windows .exe manually (machine code with Hex editor)?

后端 未结 6 504
野趣味
野趣味 2021-01-30 07:06

I\'d like to know how is it possible to write something as simple as an Hello World program just by using an Hex Editor. I know that I could use an assembler and assembly langua

6条回答
  •  迷失自我
    2021-01-30 07:31

    I wrote an article on creating executable DOS binary files just by using the ECHO at the command prompt. No other 3rd party HEX utilities or x86 IDEs required!

    The technique uses a a combination of keypad - ALT ASCII codes which convert OPCODES to a binary format readable directly under MSDOS. The output is a fully runnable binary *.com file.

    http://colinord.blogspot.co.uk/2015/02/extreme-programming-hand-coded.html

    Excerpt: Type the following key commands at the DOS prompt remembering to hold Left ALT.

    c:\>Echo LALT-178 LALT-36 LALT-180 LALT-2 LALT-205 LALT-33 LALT-205 LALT-32 > $.com
    

    The codes above are actually opcode values describing an X86 assembly program to print a dollar sign to the screen.

    Your prompt should look something similar below when finished. Press enter to build!

    c:\>Echo ▓$┤☻═!═  > $.com
    

    Run the file '$.com' and you will see a single dollar ($) character displayed on the screen.

    c:\>$.com
    $
    c:\> 
    

    Congratulations! You just created your first hand coded executable file called $.com.

提交回复
热议问题