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

后端 未结 10 1670
天涯浪人
天涯浪人 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:22

    With pure machine code, you can use any language that has an ability to write files. even visual basic.net can write 8,16,32,64 bit while interchanging between the int types while it writes.

    You can even set up to have vb write out machine code in a loop as needed for something like setpixel, where x,y changes and you have your argb colors.

    or, create your vb.net program regularly in windows, and use NGEN.exe to make a native code file of your program. It creates pure machine code specific to ia-32 all in one shot throwing the JIT debugger aside.

提交回复
热议问题