Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / June 2004

Tip: Looking for answers? Try searching our database.

Reading MSIL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Raymond Lewallen - 01 Jun 2004 23:35 GMT
Is there some article out there that helps in reading MSIL?  I've been
looking but can't find anything, and I'm probably just looking in the wrong
spots for the wrong keywords.  I understand mov, call, jmp, ptr, dword and
some of the other obvious pieces.  I'm looking to understand some of the
less obvious pieces of MSIL so I can better understand how my code is being
constructed in release mode.

TIA,

Raymond Lewallen
Federal Aviation Administration
Raymond Lewallen - 01 Jun 2004 23:43 GMT
Sorry, should have mentioned that I've searched my entire hard drive for two
files I was told I should have:  Partition II Metadata.doc and Partition III
CIL.doc, neither of which I can find.

Raymond Lewallen

> Is there some article out there that helps in reading MSIL?  I've been
> looking but can't find anything, and I'm probably just looking in the wrong
[quoted text clipped - 7 lines]
> Raymond Lewallen
> Federal Aviation Administration
Daniel O'Connell [C# MVP] - 01 Jun 2004 23:49 GMT
> Sorry, should have mentioned that I've searched my entire hard drive for
> two
> files I was told I should have:  Partition II Metadata.doc and Partition
> III
> CIL.doc, neither of which I can find.

They should be in the <visual studio install folder>\SDK\v1.1\Tool
Developers Guide\docs.

Beyond that, the syntax you showed looks more like x86 assembly, not MSIL.
How are you viewing the IL?

> Raymond Lewallen
>
[quoted text clipped - 12 lines]
>> Raymond Lewallen
>> Federal Aviation Administration
Raymond Lewallen - 02 Jun 2004 00:19 GMT
ILDASM.EXE is what I used to look at the disassembled code..  I see lots of
ldarg, callvirt, idc.i4.x, nop.... i know what these are, i think, load
arguments to the stack, callvirt is obvious, idc.14.x i have no idea, nop
seems to do nothing, as its always a blank line.  I'll have someone with
.NET installed send me these files, or look for them off my installation
CD's.

Thanks,

Raymond Lewallen

> > Sorry, should have mentioned that I've searched my entire hard drive for
> > two
[quoted text clipped - 24 lines]
> >> Raymond Lewallen
> >> Federal Aviation Administration
Daniel O'Connell [C# MVP] - 02 Jun 2004 00:35 GMT
> ILDASM.EXE is what I used to look at the disassembled code..  I see lots
> of
> ldarg, callvirt, idc.i4.x, nop.... i know what these are, i think, load
> arguments to the stack, callvirt is obvious, idc.14.x i have no idea, nop
> seems to do nothing, as its always a blank line.  I'll have someone with
nop is literally "no op". Its an instruction that does nothing. VB tends to
insert more than C#, but the JIT will probably dump 'em.

ldc.i4.x loads the value of x onto the evaluation stack. There are other
forms of the instruction which goes beyond 9(or whatever the limit is).

Another option might be the framework SDK documentation, look up the OpCodes
class it has a list of opcodes and descriptions which might be
helpful(replace .'s with _ though).
> .NET installed send me these files, or look for them off my installation
> CD's.
[quoted text clipped - 38 lines]
>> >> Raymond Lewallen
>> >> Federal Aviation Administration
Frank Lesser [LSW] - 02 Jun 2004 09:49 GMT
Hi,

just want to mention that our LSW DotNet-Lab will contain automatically
rendered Graphical-MSIL
> www.lesser-software.com/lswdnl.htm - general information

http://www.lesser-software.com/en/content/products/LSW%20DotNet-Tools/LSW%20
DotNet-Reflection-Browser/LSW%20Diagrammer.htm
 Diagrammer which can convert MSIL into a Graphical format ( EMF,
HTML/VML ) see MSIL Visual Syntax

http://www.lesser-software.com/images/Screenshots/LSW_DotNet_Tools/LSW-DNRB/
1.2/HTML-VML/BranchConcurrency.html
latest sample automatically rendered  Framework Method containing a switch
statement.

with best regards, Frank Lesser, www.lesser-software.com

> ILDASM.EXE is what I used to look at the disassembled code..  I see lots of
> ldarg, callvirt, idc.i4.x, nop.... i know what these are, i think, load
[quoted text clipped - 39 lines]
> > >> Raymond Lewallen
> > >> Federal Aviation Administration
Rene - 05 Jun 2004 12:40 GMT
http://blog.dotnetwiki.org/archive/2004/05/11/198.aspx

Apparently this is available as a Reflector add-in and it is free.

> Hi,
>
> just want to mention that our LSW DotNet-Lab will contain automatically
> rendered Graphical-MSIL
> > www.lesser-software.com/lswdnl.htm - general information

http://www.lesser-software.com/en/content/products/LSW%20DotNet-Tools/LSW%20
> DotNet-Reflection-Browser/LSW%20Diagrammer.htm
>   Diagrammer which can convert MSIL into a Graphical format ( EMF,
> HTML/VML ) see MSIL Visual Syntax

http://www.lesser-software.com/images/Screenshots/LSW_DotNet_Tools/LSW-DNRB/
> 1.2/HTML-VML/BranchConcurrency.html
> latest sample automatically rendered  Framework Method containing a switch
[quoted text clipped - 54 lines]
> > > >> Raymond Lewallen
> > > >> Federal Aviation Administration
Gabriele G. Ponti - 07 Jun 2004 14:35 GMT
Nice. Thanks for the tip.
Diana Milirud [MSFT] - 02 Jun 2004 00:04 GMT
You can also find these documents on http://msdn.microsoft.com/net/ECMA/

Thanks,
Diana

--------------------
>From: "Raymond Lewallen" <Raymond.CTR.Lewallen@nospam.faa.gov>
>References: <OTmXviCSEHA.620@TK2MSFTNGP10.phx.gbl>
[quoted text clipped - 8 lines]
>Message-ID: <#KYiUnCSEHA.3944@TK2MSFTNGP11.phx.gbl>
>Newsgroups:
microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.clr,microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb
>NNTP-Posting-Host: nat.jccbi.gov 162.58.0.224
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.clr:10727 microsoft.public.dotnet.general:135889
microsoft.public.dotnet.languages.vb:206845 microsoft.public.dotnet.framework:72593
>X-Tomcat-NG: microsoft.public.dotnet.framework.clr
>
[quoted text clipped - 17 lines]
>> Raymond Lewallen
>> Federal Aviation Administration

Signature

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note:  For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.

Peter van der Goes - 01 Jun 2004 23:49 GMT
> Is there some article out there that helps in reading MSIL?  I've been
> looking but can't find anything, and I'm probably just looking in the wrong
[quoted text clipped - 7 lines]
> Raymond Lewallen
> Federal Aviation Administration

This is probably far less than what you were hoping for, but this will help
you understand MSIL:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptutorials/htm
l/il_dasm_tutorial.asp


It's a tutorial for the MSIL disassembler.

Signature

Peter [MVP Visual Developer]
Jack of all trades, master of none.

Diana Milirud [MSFT] - 02 Jun 2004 00:00 GMT
The best reference on MSIL I found is not an article, but a book "Inside Microsoft .NET IL Assembler" by Serge Lidin.

Also I found this online book useful when learning IL.
http://www.vijaymukhi.com/documents/books/ilbook/contents.htm

Thanks,
Diana
--------------------
>From: "Raymond Lewallen" <Raymond.CTR.Lewallen@nospam.faa.gov>
>Subject: Reading MSIL
[quoted text clipped - 7 lines]
>Message-ID: <OTmXviCSEHA.620@TK2MSFTNGP10.phx.gbl>
>Newsgroups:
microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.clr,microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb
>NNTP-Posting-Host: nat.jccbi.gov 162.58.0.224
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.clr:10726 microsoft.public.dotnet.general:135888
microsoft.public.dotnet.languages.vb:206844 microsoft.public.dotnet.framework:72592
>X-Tomcat-NG: microsoft.public.dotnet.framework.clr
>
[quoted text clipped - 9 lines]
>Raymond Lewallen
>Federal Aviation Administration

Signature

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note:  For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.