Page 1 of 1

How is C not tied to specifc processor?

Posted: Sat Oct 06, 2012 7:56 pm
by SHA-1
This has bugging me for a while, now.

Why is C not tied to a specific processor, I just can't get my head around it. Maybe someone can shed some light on this.

I know assembly is tied to a certain processor so why not C?

Re: How is C not tied to specifc processor?

Posted: Sat Oct 06, 2012 11:57 pm
by Acid_Snake
C is general purpose, and sometimes it is tied to a specific platform

Re: How is C not tied to specifc processor?

Posted: Sun Oct 07, 2012 12:13 am
by Downsider
Compiled C isn't C. Before you compile C, it's not tied to a specific processor, but after you compile it, it becomes specific to the platform you're targetting.

Re: How is C not tied to specifc processor?

Posted: Wed Jan 02, 2013 4:59 pm
by ks177
C is translated by the compiler into instructions a specific processor can understand.

Incidentally, you can also use assembly language in a somewhat more portable manner by using intrinsic functions instead of inline assembly.

http://msdn.microsoft.com/en-us/library ... 80%29.aspx

Re: How is C not tied to specifc processor?

Posted: Wed Jan 02, 2013 5:03 pm
by hgoel0974
No language is tied to a specific processor, it is the assembly, when you compile code, you translate it into assembly, before compiling, you get to choose which platform you want to compile it for, and the compiler will translate it into that platforms assembly, that is why no language is tied to a processor before compiling

Re: How is C not tied to specifc processor?

Posted: Sun Jan 06, 2013 5:53 pm
by noname120
A compiler needs to be ported to a platform to be able to use C on it.
This is why any compiled language is not tied to a specific processor.