Archived

This topic is now archived and is closed to further replies.

EvilCrap

portability? !

Recommended Posts

EvilCrap    134
i dont understand why C++ is more portable, it does compile to Asm, can u select what set to compile to? regardless, why isnt there a Generalized Asm Set? this way, programs could be compiled to this, and then, during instaliation, the users machine would convert the GAS to a native form. ?! doesnt this make since !?

Share this post


Link to post
Share on other sites
Shannon Barber    1681
C is most portable because compilers are available for nearly every type of processor (every type of assembly) in existence.

A program produced by a C++ compiler will only run on the platform it is compiler for.

quote:

regardless, why isnt there a Generalized Asm Set


Java, .Net, and Transmeta all take this appraoch.

Magmai Kai Holmlor

"Oh, like you''ve never written buggy code" - Lee

"What I see is a system that _could do anything - but currently does nothing !" - Anonymous CEO

Share this post


Link to post
Share on other sites
kurifu    122
Converting would be pretty much emulating. That is how an emulator works, it converts one ASM set to another. And if a lot of things ran like this the system would run very inefficiently.

Also, you may face problems such as patents on certain instructions sets that come with different microprocessors. I am sure Apple would love it if the Intel CPU could run MAC instructions.

It would be more efficient, and worth time, to write a language that would compile across all systems to the proper instruction set.

So create this GAS in a generic format, not to infringe on any copyrights, then recompile it to whatever instruction set on the target computer. Though this does bring many other implications into mind, such as MMX, 3D-NOW, and whatever the MAC has as its equivalent. It technically could not store instructions specific to each of those systems.

Gamedev''s AI Auto-Reply bot.

Share this post


Link to post
Share on other sites
Null and Void    1088
quote:
Original post by kurifu
Though this does bring many other implications into mind, such as MMX, 3D-NOW, and whatever the MAC has as its equivalent.

Motorolla processors have AltiVec. I don''t think the IBM PPC processors have it though. I''m not sure exactly what it does, but it''s in the same spirit.

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites