9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: jmk@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: RE: [9fans] flatassembler on Plan 9?
Date: Tue, 16 Sep 2003 11:35:47 -0400	[thread overview]
Message-ID: <616f0c88d4d9cacc230a6593fd84805c@plan9.bell-labs.com> (raw)
In-Reply-To: <81132473206F3A46A72BD6116E1A06AE479C6C@black.aprote.com>

On Tue Sep 16 07:57:27 EDT 2003, t.lankots@aprote.ee wrote:
> $ find sys -name '*.s' -exec wc -l \{\} \; |awk 'BEGIN {sum=0}
> > {print $0; sum += $1}
> > END {print sum}'
>     423 sys/src/9/alphapc/l.s
>     197 sys/src/9/alphapc/memmove.s
>      61 sys/src/9/alphapc/memset.s
>     103 sys/src/9/bitsy/bitsyreset.s
>      12 sys/src/9/bitsy/init9.s
>     856 sys/src/9/bitsy/l.s
>     119 sys/src/9/mtx/inb.s
>     567 sys/src/9/mtx/l.s
>     110 sys/src/9/pc/apbootstrap.s
>      98 sys/src/9/pc/apmjump.s
>      23 sys/src/9/pc/initcode.s
>     830 sys/src/9/pc/l.s
>      52 sys/src/9/pc/plan9l.s
>     126 sys/src/9/pc/ptclbsum386.s
>      54 sys/src/9/pc/rebootcode.s
>      29 sys/src/9/ppc/init9.s
>     841 sys/src/9/ppc/l.s
> 4501
>
> That's 4501 lines of assembly for _all_ architechtures.


A few weeks ago I looked for an alternative to writing x86 assembler (especially
the 16-bit mode stuff) and this was one I looked at, but it didn't look worth the
effort to change the output format and figure out how to bootstrap it.
Others I looked at all seemed to have similar problems or were handicapped by some
form of licence.

I'm always in 2 minds when it comes to this. We'd manage much better code for
bootstraps, etc. but we'd run the risk of overusing it. Also, every time I need
to use it is, I'm sure, the last time...

The list above is a minimal set, you really do need to write some stuff in the
C library in assembler too.


  reply	other threads:[~2003-09-16 15:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-16 11:56 Tiit Lankots
2003-09-16 15:35 ` jmk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-09-16 11:47 Tiit Lankots
2003-09-16 11:28 hooh pxw
2003-09-16 11:28 ` Charles Forsyth

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=616f0c88d4d9cacc230a6593fd84805c@plan9.bell-labs.com \
    --to=jmk@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).