wow, you both  did a good job , I asked lots of people and they did't say
very clear, it suddenly enlightened me, thanks all.

On 26 November 2010 22:32, Alan McKinnon <alan.mckin...@gmail.com> wrote:

> Apparently, though unproven, at 16:09 on Friday 26 November 2010, Stroller
> did
> opine thusly:
>
> > On 26/11/2010, at 6:07am, sam new wrote:
> > > Thanks all, I have a question , when we build the system, always use
> host
> > > client to build the toolchain , then GCC Glibc ...kernel some unity ...
> > > from source ,but where the frist system come from ,does it build using
> > > the Assembly language or machine language? I mean just give you X86
> > > hardware and power , no OS, no livd cd . I am afraid it is out of this
> > > topic.but it always puzzled me :-)
> >
> > I think you want to know which came first - the chicken or the egg?
> >
> > For a few years, operating systems were indeed written in assembler.
> Then,
> > c 1970, Unix was the first operating system written in a higher-level
> > programming language, C. Likewise, I guess, the first compilers would be
> > written in assembler, until one was written that could compile itself and
> > become "self-hosting".
> >
> > Thus new compilers and operating systems can now be written in
> higher-level
> > languages (although C isn't very high-level) and compiled using an
> > existing compiler.
> >
> > That Unix was written in C is what has lead to its ubiquity - until then
> > every different brand of computer had its own operating system, usually
> > written by the manufacturer. Written in assembly, these were
> non-portable.
> > Writing the operating system in C allowed it to be ported to different
> > hardware architectures, and programs could be written that would run on
> > all the different systems out there (as long as those ran Unix).
> >
> > Linux was written on a Minix system, Minix was written c 1987 and so
> might
> > have been written on one of the BSDs that was around then; the BSDs were
> > probably written on an AT&T Unix.
> >
> > When Intel produce a new chip - or gcc wants to support a new
> architecture
> > - they rewrite the compiler (the "backend" part of it) to output machine
> > code to suit the new chip's instruction set (which will be different from
> > that of other chips - PPC vs ARM vs MIPS vs x86). The compiled code is
> > then transferred to the new machine and fingers are crossed as everyone
> > waits to see if it boots.
> >
> > http://en.wikipedia.org/wiki/History_of_Unix
> > http://en.wikipedia.org/wiki/Compiler
> >
> > Stroller.
>
> One could ask the question "where did the first assembler come from?"
>
> Just as the first OSes and compilers were written in assembler to bootstrap
> C,
> so the first assemblers were written in hex codes to bootstrap the
> assembler.
> But hex code editors ran software, so where did the first hex code input
> gadget come from?
>
> And the answer to that is that it was written in binary. Yes that's right -
> a
> panel with 16 toggle switches and a few pushbuttons. Those didn't require
> software as everything was implemented in hardware.
>
> So now you know :-)
>
>
> --
> alan dot mckinnon at gmail dot com
>
>

Reply via email to