Assembler library for .NET, assembling runtime-variable strings into machine code for injection

后端 未结 8 1000
醉酒成梦
醉酒成梦 2020-12-14 09:23

Is there such a thing as an x86 assembler that I can call through C#? I want to be able to pass x86 instructions as a string and get a byte array back. If one doesn\'t exist

8条回答
  •  轮回少年
    2020-12-14 09:46

    As part of some early prototyping I did on a personal project, I wrote quite a bit of code to do something like this. It doesn't take strings -- x86 opcodes are methods on an X86Writer class. Its not documented at all, and has nowhere near complete coverage, but if it would be of interest, I would be willing to open-source it under the New BSD license.

    UPDATE: Ok, I've created that project -- Managed.X86

提交回复
热议问题