473,405 Members | 2,154 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,405 software developers and data experts.

A Console .EXE

Jay
In console programming what does the .EXE file contain. Is it native code
or MSIL? Where does the JIT fit in the picture? Is JIT line by line
interpreted or does it compile the entire module?
Nov 16 '05 #1
6 1389
Hi Jay,

I believe it contains the MSIL.

Try this.

1) Make sure you have created a .NET console app exe from the vs.net (just build it).

2) Use Microsoft Visual Studio .NET 2003 Command Prompt.

3) Type ildasm.exe ConsoleApp.exe

4) You can see the IL codes there.

About JIT, i am not that sure. Maybe someone can elaborate further.

Thanks. Correct me if i am wrong.
--
Regards,
Chua Wen Ching :)
"Jay" wrote:
In console programming what does the .EXE file contain. Is it native code
or MSIL? Where does the JIT fit in the picture? Is JIT line by line
interpreted or does it compile the entire module?

Nov 16 '05 #2
"Jay" <j@h.com> wrote in news:QUHFc.1219$r3.904@okepread03...
In console programming what does the .EXE file contain.
A CLR stub, metadata and IL. Same as for "regular" executables.
Is it native code or MSIL?
MSIL
Where does the JIT fit in the picture?
When you launch the EXE, the CLR creates a stub for each method that will
compile it from IL to native code as soon as it gets called for the first
time - just in time (JIT).
Is JIT line by line interpreted or does it compile the entire module?


It's not interpreted. It's compiled. It compiles a function when it is
called.

Niki
Nov 16 '05 #3
Jay
> A CLR stub, metadata and IL. Same as for "regular" executables.

When you refer to regular executables are you referring to C++ executables.
I was under the impression that C++ executables contained native code

Also, what form does the code take on after JIT? Is it in memory only or is
a file created?

Thank You so much for your response!
Nov 16 '05 #4

"Jay" <j@h.com> wrote in message news:y8VFc.1748$r3.868@okepread03...
A CLR stub, metadata and IL. Same as for "regular" executables.
When you refer to regular executables are you referring to C++
executables.
I was under the impression that C++ executables contained native code

A regular executable would be any native executable, be it created by C++,
Pascal, fortran, or compiled perl. As long as it is standard machine codes
in a recognized executable format.

Also, what form does the code take on after JIT? Is it in memory only or
is
a file created?

JIT generated code must exist in memory, asthe processor must execute it. On
disk caches would be something I would consider implementation specific.
While some JIT's may write caches(and if memory serves, the .NET frameworks
does atleast under some circumstances), there is no requirement to.

Nov 16 '05 #5
"Jay" <j@h.com> wrote in news:y8VFc.1748$r3.868@okepread03...
A CLR stub, metadata and IL. Same as for "regular" executables.
When you refer to regular executables are you referring to C++

executables. I was under the impression that C++ executables contained native code
Oh, that was not very precise of me. I meant windows forms or service or any
other kind of executable created by a managed compiler. Non-Managed (e.g.
C++) executables have different structure. Sorry.
Also, what form does the code take on after JIT? Is it in memory only or is a file created?


Initially it's in main memory, but it may be cached to disk if physical
memory is low. When it is executed, it goes into the processors's cache and
finally, into the processor.

If you're interested in the details of the framework, there's an excelent
book on that topic by Jeffrey Richter.

Niki
Nov 16 '05 #6

"Niki Estner" <ni*********@cube.net> wrote in message news:%>
Initially it's in main memory, but it may be cached to disk if physical
memory is low. When it is executed, it goes into the processors's cache
and
finally, into the processor.


For clarities sake, the caching I was refering to relates to on-disk
caches(into a seperate file) for the purposes of maintaining the generated
code for as long as possible(until the system changes in such a way that the
code is invalid), whereas the caching here(if I got you right, anyway) would
be related to the paging system, which may be based off the system page file
or off a mapped cache file, entirely based upon circumstances and the
implementation.

Nov 16 '05 #7

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

Similar topics

19
by: Dave | last post by:
Hi, I have done some research, trying to Clear The Screen in java code. The first option was the obv: system.out.print("\n\n\n\n\n\n\n\n\n\n\n\n"); then i heard about this method:...
1
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
7
by: shawnk | last post by:
Hello Everyone How do you format format numbers right-justified using Console.WriteLine(), i.e I need to line up numbers in vertical columns and the MSDN documentation is pretty poor Here is the...
5
by: Barry Mossman | last post by:
Hi, can I detect whether my class is running within the context of a Console application, vs say a WinForm's application ? also does anyone know whether the compiler or runtime is smart enough...
5
by: Publicjoe | last post by:
I am working on a little app which uses colour in the console window. I have created a class to extend the console functionality but the ClearScreen method does not work correctly. I am enclosing a...
17
by: MumboJumbo | last post by:
Hi I have a really basic question hopefully some can help me with: Can you write a (i.e. one) C# project that works from the cmd line and gui? I seems if i write a GUI app it can't write to...
5
by: portroe | last post by:
Hi I am using console.Writeline in my simple program. I do not however see anything happening in the output window when I debug, there are also no error messages, Has anybody a tip on what...
3
by: julianmoors | last post by:
Hey, Currently I'm writing a VB.NET/1.1 app and I need to mask the input for the password field. Does anyone know how to do this in VB? I've seen a C# example, but wouldn't know how to convert...
6
by: tony | last post by:
Hello! When you have windows forms you have the same possibility as when you have a Console application to use Console.Writeln to write whatever on the screen. Now to my question: Is it...
1
by: John Wright | last post by:
I am running a console application that connects to an Access database (8 million rows) and converts it to a text file and then cleans and compacts the database. When it runs I get the following...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.