You need at least Visual C++ 2005 or greater to use this. It was tested with Visual Studio 2008, as well as Visual C++ 2010 Express, available for free here.
How to use (GUI):
Using the GUI is rather straight-forward. Type your function(s) in the textbox, and press "Create machine code!" to have the machine code pasted onto the clipboard. For example, the C code:
MyFunction() { return 42; } MyFunction2() { return 43; }will generate this on the clipboard:
MCode(MyFunction, "6A2A58C3") MCode(MyFunction2, "6A2B58C3")
How to use (command-line):
For better integration with text editors, MCodeGen also supports a command-line interface. The syntax is:
MCodeGen [options...] filepathAvailable options are:
-minsize Optimizes for minimum size (not compatible with -maxspeed) -maxspeed Optimizes for maximum speed (not compatible with -minsize) -c Compile as C code (not compatible with -cpp) -cpp Compile as C++ code (not compatible with -c) -notify Alert by notifications instead of message boxes -x86 Compile for x86 target architecture -x64 Compile for x64 target architecture -warn[n] Set warning level ([n] is between 0 and 4, e.g. -warn0) If neither -minsize nor -maxspeed is specified, MCodeGen defaults to -minsize. If neither -c nor -cpp is specfied, MCodeGen will choose by the file extension. If neither -x86 or -x64 is specified, MCodeGen defaults to -x86.
Download
Last updated: August 17th, 2010
Changelog
August 17th, 2010
- More precise parsing
- Added support for x64
June 27th, 2010
- Now reloads the last code compiled on startup.
June 26th, 2010
- Fixed GUI exiting after compile error.