Re: Is compiler OS specific or Hardware specific....

From: angeles (jojo_at_jojo.com)
Date: 02/27/04


Date: Fri, 27 Feb 2004 22:40:27 GMT


> hi,
> i have following doubts.
> is compiler OS specific or Hardware specific i.e processor specific.??
> the confusion is because of the following (half ??)knowledge..
> if the compiler is OS specific then one must know the internals of the
> OS!!!
> but since the OS like windows are proprietary and don't reveal any
> source code then how the compiler is designed for such an OS??
> is it purely dependent on the processor architecture then???
> also how the JVM for windows was made despite sun not knowing any of
> windows details?? or do OS vendors distribute kernel apis???
> regds,
> yogesh
>
> ps. I post the same question in comp.compiler but my question was
> never published thereon..

Compilers are both OS and processor specific. You shouldn't need to know
the internals of the OS unless you are making calls to the OS, or if you're
using a language that was made for portability, like C or Java.

Although it is OS specific, most of this revolves around the executable
file format.

Windows code is proprietary, but you can still know how it works via the
API. Research more on "Win32 API."

JVM is a virtual machine. It is compiled code for a computer that doesn't
exist. Then, an emulator (called a virtual machine) for that non-existant
machine executes the code on any system that supports it, in the same way
that you can emulate a SNES or Genesis system.



Relevant Pages

  • Re: hmm..interesting
    ... you've got a discussion of ARM vs Intel architecture here: ... And ARM is rapidly running away from RISC. ... mainstream (many netbooks and smartphones run Linux instead of Windows ... And hardly any C compiler does. ...
    (comp.sys.acorn.hardware)
  • Re: Quick question about streams...?
    ... Okay, I don't mind learning all there is to learn, but wait a minute... ... And isn't the API a bunch of C functions? ... Whereby they made Windows out of C language right..... ... VC++ is a compiler that will compile C and C++ programs. ...
    (microsoft.public.vc.language)
  • Re: Stalin ported to Windows.
    ... Therefore, the compiler ... Stalin from Scheme sources; it took six hours to generate the C ...   Junia and Reane  got a working Windows port from the C ...
    (comp.lang.scheme)
  • Re: hmm..interesting
    ... work out at more power per Watt than x86. ... mainstream (many netbooks and smartphones run Linux instead of Windows ... the fact that Visual Studio allows you to get away with fairly sloppy ... difficult to find a C compiler that *doesn't* have vendor-specific ...
    (comp.sys.acorn.hardware)
  • Re: C++ programming migration from DOS to Windows
    ... compiler, so the current compiler is quite competitive WRT to ... There are a couple of ports of gcc to Windows. ... Comeau is more or less unique: the best language conformance you can ... IDEs: Microsoft and Borland have both produced decent IDEs in the past, ...
    (comp.lang.cpp)

Loading