How to write and execute PURE machine code manually without containers like EXE or ELF?

后端 未结 10 1671
天涯浪人
天涯浪人 2020-11-30 18:38

I just need a hello world demo to see how machine code actually works.

Though windows\' EXE and linux\' ELF is near machine code,bu

10条回答
  •  醉话见心
    2020-11-30 19:24

    On Windows--at least 32bit Windows--you can execute RAW INSTRUCTIONS using a .com file.

    For instance, if you take this string and save it in notepad with a .com extension:

    X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
    

    It will print a string and set off your antivirus software.

提交回复
热议问题