Assembly (CLI) - Language of An Assembly

Language of An Assembly

The assembly is built up with the CIL code, which is an intermediate language. The framework internally converts the CIL into native assembly code. If we have a program that prints "Hello World", the equivalent CIL code for the method is:

.method private hidebysig static void Main(string args) cil managed { .entrypoint .custom instance void System.STAThreadAttribute::.ctor = ( 01 00 00 00 ) // Code size 11 (0xb) .maxstack 1 IL_0000: ldstr "Hello World" IL_0005: call void System.Console::WriteLine(string) IL_000a: ret } // end of method Class1::Main

So the CIL code loads the String onto the stack. Then it calls the WriteLine function and returns.

Read more about this topic:  Assembly (CLI)

Famous quotes containing the words language and/or assembly:

    the communication
    Of the dead is tongued with fire beyond the language of the living.
    —T.S. (Thomas Stearns)

    There is a sacred horror about everything grand. It is easy to admire mediocrity and hills; but whatever is too lofty, a genius as well as a mountain, an assembly as well as a masterpiece, seen too near, is appalling.
    Victor Hugo (1802–1885)