473,320 Members | 1,612 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Reading MSIL

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
Jul 21 '05 #1
10 4535
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

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:OT*************@TK2MSFTNGP10.phx.gbl...
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

Jul 21 '05 #2

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:OT*************@TK2MSFTNGP10.phx.gbl...
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

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

http://msdn.microsoft.com/library/de...m_tutorial.asp

It's a tutorial for the MSIL disassembler.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
Jul 21 '05 #3

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:OT*************@TK2MSFTNGP10.phx.gbl...
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


Jul 21 '05 #4
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

"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in
message news:Og****************@TK2MSFTNGP09.phx.gbl...

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message news:OT*************@TK2MSFTNGP10.phx.gbl...
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



Jul 21 '05 #5

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:Og**************@tk2msftngp13.phx.gbl...
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.

Thanks,

Raymond Lewallen

"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in
message news:Og****************@TK2MSFTNGP09.phx.gbl...

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
> 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
>
> "Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message > news:OT*************@TK2MSFTNGP10.phx.gbl...
>> 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
>>
>>
>
>



Jul 21 '05 #6
There is an excellent Microsoft Press book written by Sergei ? (designer of IL) - anyone remember the name
Jul 21 '05 #7
Inside Microsoft .Net IL Assembler, Serge Lidin, Microsoft Press, ISBN
0-7356-1547-0

Nick.

"fred" <an*******@discussions.microsoft.com> wrote in message
news:AD**********************************@microsof t.com...
There is an excellent Microsoft Press book written by Sergei ? (designer of IL) - anyone remember the name?

Jul 21 '05 #8
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/co...t-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/image...ools/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
"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:Og**************@tk2msftngp13.phx.gbl... 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

"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in
message news:Og****************@TK2MSFTNGP09.phx.gbl...

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in

message news:OT*************@TK2MSFTNGP10.phx.gbl...
> 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
>
>



Jul 21 '05 #9

http://blog.dotnetwiki.org/archive/2004/05/11/198.aspx

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

"Frank Lesser [LSW]" <Fr**********@lesser-software.com> wrote in message
news:uE*************@TK2MSFTNGP11.phx.gbl...
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/co...t-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/image...ools/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
"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message
news:Og**************@tk2msftngp13.phx.gbl...
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

"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in
message news:Og****************@TK2MSFTNGP09.phx.gbl...

"Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
> 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
>
> "Raymond Lewallen" <Ra******************@nospam.faa.gov> wrote in

message
> news:OT*************@TK2MSFTNGP10.phx.gbl...
>> 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
>>
>>
>
>



Jul 21 '05 #10
Nice. Thanks for the tip.
Jul 21 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: TrickyDicky | last post by:
Hi all, I'm just starting to experiment with MSIL but am getting confused about c# and MSIL integration. I understand that c# is compiled into MSIL before it is JIT'ed and then executed. I...
6
by: Pawel | last post by:
Ary you know tools to convert MSIL code (Assembly) to Win32 (not Just In Time)?
7
by: carl.manaster | last post by:
Hi, I'd like to take a string containing MSIL code, assemble it, execute it, and receive the result all from my running C# application. So far I've managed to manually create some MSIL code...
4
by: James dean | last post by:
My understanding is the MSIL runs on the CLR and the CLR is basically the JIT compiler plus Garbage collection. This part "MSIL runs on the CLR" is a bit vague to me can anyone give me a clearer...
3
by: NigelW | last post by:
Clarification needed please. If I compile a C++ program with the /clr option inpsection of the resulting assembly with ILDASM shows MSIL even for methods in classes for which I have not...
1
by: John Doe | last post by:
Hi all, I have a lot of confusion about what this runtime environment is. When I write an application with unmanaged code and unmanaged data, can I compile it to the MSIL, or it will compile...
9
by: Raymond Lewallen | last post by:
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,...
2
by: Stefan Hoffmann | last post by:
hi @all, I have these two getter: public ArrayList I1 { get { if (i1 == null) {
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.