-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: ChiefCoder
Message 6 in Discussion
Hey there First MSIL is not binary at all. We can write straightaway in MSIL. Let me
give you an example of MSIL. .assembly extern mscorlib{}
.assembly HW
{
.ver 1:0:1:0 //Major:Minor:Build:Revision
}
.module HW.exe
.method static void Main() cil managed
{
.maxstack 1 // Why? Refer to my link after the code
.entrypoint //This is main entrypoint for application
ldstr "Heeeyyy" //The message you want on screen
call void [mscorlib]System.Console::WriteLine(string) //Display from the loaded string
ret //return back the control
} Click here to see one of my previous posts.
http://groups.msn.com/bdotnet/general.msnw?action=get_message&mview=0&ID_Message=3970&LastModified=4675431814071049860
Name the above code file as a.il . Now this code is something that we have written,
it aint executable straightway. We have to assemble this code to an executable form by
using C:\>ilasm a.il It will create an executable a.EXE (Which is machine
understandable) which will then be executed in CLR by EconoJIT (or ngen.exe). So next
just write C:\>a And get your message displayed on screen. Similarly , if you want
the code back dissassemble it with C:\>ildasm.exe a.exe /out=gimmeback.il Sumit
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]