473,763 Members | 3,910 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MSIL code

Hello!

I'm reading in a book and it says the following.

"MSIL(Micro soft Intermediate Language) generated by all the .NET language
compilers. This is a common
standard for the binary code generated by the compilers and is what is
executed by the CLR"

Now to my question about the text.
Is it really true that CRL is executing the MSIL code ?

I'm quite sure that the code that CRL will execute is the native code that
is output from the JIT
compilers.
The JIT take MSIL as input and generate OS native code that CLR can execute.

You may correct me if I'm wrong here ?

//Tony
Aug 28 '08 #1
3 2954
MSIL is compiled to native instructions by the just-in-time compiler and
then those are executed. Although the statement is incorrect I suspect the
author may have merely omitted some of the details of the process.
Pete

Aug 28 '08 #2
"Tony Johansson" <jo************ *****@telia.com wrote in message
news:u6******** ******@TK2MSFTN GP02.phx.gbl...
Hello!

I'm reading in a book and it says the following.

"MSIL(Micro soft Intermediate Language) generated by all the .NET language
compilers. This is a common
standard for the binary code generated by the compilers and is what is
executed by the CLR"

Now to my question about the text.
Is it really true that CRL is executing the MSIL code ?

I'm quite sure that the code that CRL will execute is the native code that
is output from the JIT
compilers.
The JIT take MSIL as input and generate OS native code that CLR can
execute.
>
You may correct me if I'm wrong here ?
I'm don't think the statement is incorrect.

The CLR represents a machine which executes IL. How it does this is doesn't
nullify the fact the IL does ultimately get executed and the thing
responsible for having it executed is the CLR.

If its not true to say "the CLR executes IL code" then the same could be
applied to "a CPU executes machine code". Internally a processor may break
down the execution of single machine instruction into several steps and its
those steps which 'execute'.

--
Anthony Jones - MVP ASP/ASP.NET
Aug 28 '08 #3
The clr is responsible for the execution of MSIL code. This does not mean
that it executes it as though it were in a virtual machine of the classic
type.

The code does run natively on the processor.

However, the process of verification and compilation that the code goes
through before it gets to actually execute on the registers of the processor
is so intense that we might consider the CLR to be a virtual machine.

The strategy has one clear advantage over the classic interpretationa l or
tokenised virtual machine, that is that once verified, checked and compiled,
the process doesn't have to happen again for the second time that a given
routine is called.
--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Tony Johansson" <jo************ *****@telia.com wrote in message
news:u6******** ******@TK2MSFTN GP02.phx.gbl...
Hello!

I'm reading in a book and it says the following.

"MSIL(Micro soft Intermediate Language) generated by all the .NET language
compilers. This is a common
standard for the binary code generated by the compilers and is what is
executed by the CLR"

Now to my question about the text.
Is it really true that CRL is executing the MSIL code ?

I'm quite sure that the code that CRL will execute is the native code that
is output from the JIT
compilers.
The JIT take MSIL as input and generate OS native code that CLR can
execute.

You may correct me if I'm wrong here ?

//Tony

Aug 28 '08 #4

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

Similar topics

10
4582
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, 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
6
2954
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 also understand that it is possible for me to generate my own MSIL using the System.Reflection.Emit namespace. However, is it possible for my c# code to call into my pre-MSIL-compiled code, passing and returning values?
6
2005
by: Pawel | last post by:
Ary you know tools to convert MSIL code (Assembly) to Win32 (not Just In Time)?
7
2026
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 that I can successfully assemble with ilasm and execute at the DOS prompt, and I've read up on System.Reflection.Emit and CodeDom, but I don't see how to do this. It looks like I would have to write a whole System.CodeDom.Compiler.CodeCompiler; I...
4
19128
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 definition and explain how these 3 work together. *** Sent via Developersdex http://www.developersdex.com ***
3
3393
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 specified garbage collection with __gc. Am I correct in thinking there is really two kinds of managed (i.e. MSIL) code from C++, that which uses garbage collection and that which does not?
1
1822
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 mandatorily to the x86 instruction set?
3
1650
by: Mark Fox | last post by:
Hello, I have read a lot about how the .NET Framework uses MSIL as its intermediate language. If I have a project in C# in VS.NET 2003, how do I get the MSIL for it so I could look at it? Better yet, I would like to obfuscate it using the Dotfuscator Community Edition and then get the obfuscated MSIL into a text file of some sort. How would I do this? Thanks for your help!
10
1935
by: Number 11950 - GPEMC! Replace number with 11950 | last post by:
Hi all, Playing VS2005 was more fun than Doom III, and I do enjoy my games. Anyway, it's back to work for me and I'm bogged down in my familiar VB6 stomping grounds because I don't want my secrets exposed to casual inspection via MSIL. VB6 doesn't do this to me, whereas, if I read Balena correctly, VB2005 always will. The one single and only issue holding up my migration is this matter of IP security, and I'm sorry folks but no...
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.