public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jos Hulzink <josh@stack.nl>
To: "H. Peter Anvin" <hpa@zytor.com>, linux-kernel@vger.kernel.org
Subject: Re: What are .s files in arch/i386/boot
Date: Sun, 8 Jun 2003 22:04:15 +0200	[thread overview]
Message-ID: <200306082204.16079.josh@stack.nl> (raw)
In-Reply-To: <bbtlc6$qtd$1@cesium.transmeta.com>

On Saturday 07 Jun 2003 23:27, H. Peter Anvin wrote:
> Followup to:  <6un0gty981.fsf@zork.zork.net>
> By author:    Sean Neakums <sneakums@zork.net>
> In newsgroup: linux.dev.kernel
>
> > James Stevenson <james@stev.org> writes:
> > >> > > What are .s files in arch/i386/boot, are they c sources of some
> > >> > > sort? Where can I find the specifications documents they were made
> > >> > > from?
> > >> >
> > >> > There are not c files.
> > >> > They are assembler files
> > >> >
> > >> Where can I find the .c files they were made from,
> > >> and the spec sheets the .c files were made from?
> > >
> > > You would have to find the original author of the person
> > > who tweaks the assembler in the .s file chances are the .c
> > > file is long gone though.
> >
> > If there were ever C files to begin with.  It's not unheard-of for
> > people to write assembler code from scratch.
>
> The ones in the Linux kernel were all written from scratch.

And for a very good reason. A few things really need asm, for example getting 
a CPU in protected mode, setting up the MMU and stuff. Once they are set up, 
you can use C, though sometimes you must be really sure what your compiler 
will make from the C.

So, why assembly ? Cause it is needed. Why in arch/i386/boot ? for if it is 
well done there, it isn't needed at many other locations. A few things will 
still require asm though, therefore you'll find more .s files in arch/i386. 

Jos

  reply	other threads:[~2003-06-08 19:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-07 18:54 What are .s files in arch/i386/boot Lars Unin
2003-06-07 20:05 ` James Stevenson
2003-06-07 19:32   ` Sean Neakums
2003-06-07 21:27     ` H. Peter Anvin
2003-06-08 20:04       ` Jos Hulzink [this message]
2003-06-08 21:41         ` Shawn
2003-06-09  1:38   ` Horst von Brand
  -- strict thread matches above, loose matches on Subject: below --
2003-06-09 15:37 Lars Unin
2003-06-09 15:30 Lars Unin
2003-06-09 21:06 ` Steve Brueggeman
2003-06-07 18:36 Lars Unin
2003-06-07 19:50 ` James Stevenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200306082204.16079.josh@stack.nl \
    --to=josh@stack.nl \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox