\\\\\\\\\\\\\\\\\\\\\\\\
Hello World! in Ilasm \\\
\\\\\\\\\\\\\\\\\\\\\\\\\\

for you to understand what i'm talkin' about, you must download .NET Software Development Kit From Microsoft...
and be sure to study the help files and essential documents from the SDK

What is MSIL?

"Microsoft Intermediate Language (MSIL)

When compiling to managed code, the compiler translates your source code into Microsoft intermediate language (MSIL), 
which is a CPU-independent set of instructions that can be efficiently converted to native code. MSIL includes 
instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for 
arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations. 
Before code can be executed, MSIL must be converted to CPU-specific code by a just in time (JIT) compiler. 
Because the runtime supplies one or more JIT compilers for each computer architecture it supports, the same set of 
MSIL can be JIT-compiled and executed on any supported architecture.

When a compiler produces MSIL, it also produces metadata. Metadata describes the types in your code, 
including the definition of each type, the signatures of each type's members, the members that your code references, 
and other data that the runtime uses at execution time. The MSIL and metadata are contained in a portable executable 
(PE file) that is based on and extends the published Microsoft PE and Common Object File Format (COFF) used historically 
for executable content. This file format, which accommodates MSIL or native code as well as metadata, enables the 
operating system to recognize common language runtime images. The presence of metadata in the file along with the 
MSIL enables your code to describe itself, which means that there is no need for type libraries or Interface 
Definition Language (IDL). The runtime locates and extracts the metadata from the file as needed during execution."

What is Ilasm?

"MSIL Assembler (Ilasm.exe) Generates a PE file from Microsoft intermediate language (MSIL). You can 
run the resulting executable, which contains MSIL code and the required metadata, to determine 
whether the MSIL code performs as expected."

Why Ilasm and not C#, C++.NET, VB.NET or Jscript.NET?

coz Ilasm is a new ground and only a few documentations for it exist.... In short, Ilasm is challenging and worth studying..
...


brief...


save as helloconsole.il
ilasm helloconsole.il /exe
----------------------------------------------------------------------------

.assembly hello {}

.method static public void main() cil managed
{
.entrypoint
.maxstack 1
ldstr  "Hello World!"
call   void [mscorlib]System.Console::WriteLine(class System.String)
ret
}



-----------------------------------------------------------------------------

executing helloconsole.exe will display Hello World! in MS-DOS console...


save as msgbox.il
ilasm msgbox.il /exe
-----------------------------------------------------------------------------
.module extern user32
.assembly msgbox{}

.class public Win32

{
  .method public hidebysig static pinvokeimpl("user32.dll" autochar winapi) 
          int32  MessageBox(int32 hWnd,
                            string text,
                            string caption,
                            unsigned int32 type) cil managed preservesig
  {
  }
}

.class public Hello
{
.method static public void main() cil managed
{
.entrypoint
.maxstack 8
ldc.i4.0
ldstr "Hello World!"
ldstr "from IllAwesome"
ldc.i4.0
call  int32 Win32::MessageBox(int32,
                              string,
                              string,
                              unsigned int32)
pop
ret
}
}

------------------------------------------------------------------------------

executing msgbox.exe will display the msdos console window and then display the messagebox,

--------------------
from IllAwesome
--------------------
Hello World!
--------------------

to be able to understand IL assembly language well, you must read the documents in 

\Program Files\Microsoft.NET\FrameworkSDK\Tool Developers Guide\docs

then learn C#, C++.NET, VB.NET or Jscript.NET, write
programs for those said languages, compile them and disassemble the compiled programs using ILDasm...

What is ILDasm?

"MSIL Disassembler (Ildasm.exe) Takes a PE file that contains MSIL code and creates a text file suitable as input 
to the MSIL Assembler (Ilasm.exe). "

then if you're an expert in reading disassemblies, you'll now be able to write IL assembly codes...

people in the past did reverse engineering of viruses and became experts in virus coding... :)

.NET is the future!

Hello World for now, tomorrow, IL viruses !!


\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
by : IllAwesome\\\\\\\\\\\\\\\\\\
7152002\\\\\\\\\\\\\\\\\\\\\\\\\\\
"IL Asm is the pyucha..."\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\


