how do i write assembly code from c#?

i want to write a string of assembly code in c# and have it sent to some win32 api to compile and execute it and get the results back.


string str = "MOV 1,2;XOR EBP,EBP"...

sounds like hard to do but any suggestion would be helpful.


I doubt there's a win API to compile & execute assembly. Probably the best you could do is write a file, execute MASM (or whatever it's called these days), link it then execute the resulting program. I can't imagine what you are trying to do but this would be pretty much the last way I would try to solve almost any problem!

If you want to compare native & managed code, just write two programs that do more or less the same thing. There is no reason to generate the assembly from .NET. You can use any suitable tool for this. MASM, debug etc.

Need Your Help

Django 1.6 - edit profile - AttributeError at /editseekerprofile/

python django profile

I'm trying to create edit user profile functionality. But I get the following error

Uploading a cloned canvas photo by dynamically creating a html file element with the default value being the canvas image

javascript php jquery html canvas

I'm trying to apply image filters to an image and have the file element be recreated every time a filter is clicked. Thus, the would be pseudo code. Its still saying the file field is null and im ...