.NET ---> Processor independent???

S

Sriram

Hi,
I have worked in VB6 and now I have started working
in VB.Net.It is said that .NET code is platform
independent atleast within Windows operating systems.
which I understand is made possible through IL which is
processor and OS independent.
My question is if we have a VB 6 exe that too runs on all
windows operating systems and on Intel , AMD and Cyrix
processors ( not very sure about this as I have run only
on Intel !) even though we have compiled in on one specifi
machine (say an intel machine) .
VB6 is compiled to native code (whoch ties it to t he
platform) and still it runs on all these windows
platforms .
Can anybody explain how this possible?

Also please check out the following link :
http://www.mastercsharp.com/article.aspx?
ArticleID=20&&TopicID=10
and look under subtopic Processor independence. . it says
that with VB/C ++ we had to make separate build for each
processor. I dont think this is true.

Please comment on this.

Thanking you in advance.

Regards,
Sriram
 
J

Jon Skeet [C# MVP]

Sriram said:
I have worked in VB6 and now I have started working
in VB.Net.It is said that .NET code is platform
independent atleast within Windows operating systems.
which I understand is made possible through IL which is
processor and OS independent.
My question is if we have a VB 6 exe that too runs on all
windows operating systems and on Intel , AMD and Cyrix
processors ( not very sure about this as I have run only
on Intel !) even though we have compiled in on one specifi
machine (say an intel machine) .
VB6 is compiled to native code (whoch ties it to t he
platform) and still it runs on all these windows
platforms .
Can anybody explain how this possible?

Yes - those processors are basically compatible, for the most part,
although each has a few extra instructions which a good JIT could take
advantage of.

However, you can't run your existing VB6 code on, say, a Mac without
recompiling (or running some PC emulator) - whereas you *could* with a
program written in IL and then JIT-compiled by the CLR for that
platform.
 
J

Jim

This seems much more useful in the pocket pc world where there are a couple
of processors. I have actually tried this, if you make a smartdevice (I
think that is what it is) project the resultant exe will run on both my ipaq
and my pc! With no recompilation even! Not sure how useful that really is
but it was fun to try anyway.

__


Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top