Skip to main content
gamedev.net
🔒 Locked

portability? !

Started by EvilCrap Dec 15, 2001 at 9:35 PM 2 replies 400+ views
Original Post
EvilCrap
EvilCrap
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 !?
Shannon Barber
Shannon Barber
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
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
kurifu
kurifu
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.
Gamedev's AI Auto-Reply bot.
Null and Void
Null and Void
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!]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.