Introducing MachineLang.Net

Posted: 4/1/2011 1:27:21 PM

We hope you enjoyed our little April Fools joke this year

Do you want to code with the sheer simplicity of x86 Machine Code without all of the complicated “features” of 4th, 3rd or even 2nd generation languages, all the while being able to run on top of .Net’s CLR? Well, this post is for you!

Let’s start with the current problems with “modern” programming languages today:

4th Generation Language? Who needs declarative markup or domain specific languages? Sounds like a bunch of academics are just trying to get their next PhD instead of helping me write awesomely fast code. Drowning a sack full of puppies is more fun than debugging a slow stored procedure.

3rd Generation Language? OO? Structured Programming? Yeah, right, they should come see the projects I’ve had to work on in the past, it was more like an object oriented scaffolding to the depths of hell. I’d rather gouge my eyes out with salt covered rusty fork than look at one more inheritance chain 30 levels deep.

2nd Generation Languages are getting closer, the speed is mostly there. But do we really want to dumb down our craft just so some stupid people can “read” and “understand” better? What does that say about our profession? If you can’t convert “XOR CL, [12H]” to “00110010 00001110 00010010 00000000” in your head, please give up on life because you will never amount to anything.

It is simple really, just write all of your machine language in a single .ml file, and run the machine lang compiler (mlc.exe) and you’ll have a new .net executable waiting for you in the same directory as your .ml file, than can run on any machine with the .Net framework on it.

00010100 00010001 00000101 00001111
00111110 11010101 01111011 00011100
11001100 10101001 00101011 10001110
01010001 11111110 01101001 11010110
00110101 00100000 00011000 11111001
11001010 11111101 10111001 00011001
11111101 11111111 00001001 10000010
11110111 00010001 10010100 10000000
00011001 00011000 01110101 10101011
10110111 00000001 11011000 00100100
10010001 11111101 10111100 11011100
01101100 01111111 10000001 11101110
10010010 10001110 01110000 11001101
11101101 00001010 01001010 00000101
11001010 01101100 00101011 00011011
10001100 11111010 11011001 11001010
01101011 00010111 11101110 01010101
00111011 10101001 01100001 00001100
01110011 00011011 01110000 01001011
00001001 11101100 10100101 00111111

Then just open up your command line and run the following command:
mlc.exe -in -out HelloWorld.exe

You can AND SHOULD download and run the HelloWorld example here. You'll smile when you're done, I promise.

If you're afraid that you may have some duplicate code in your next MachineLang.Net project, be sure to check out Atomiq Duplicate Code Finder.