9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] flatassembler on Plan 9?
  2003-09-16 11:28 [9fans] flatassembler on Plan 9? hooh pxw
@ 2003-09-16 11:28 ` Charles Forsyth
  0 siblings, 0 replies; 5+ messages in thread
From: Charles Forsyth @ 2003-09-16 11:28 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

not counting /sys/src/9/pc/*.root.s, the assembly code in the system including libraries is perhaps
1500 to 2000 lines (mostly little hand-optimised functions in the libraries, and chunks of code
for the machine-level support for bootstrap and kernel).  so that seems a waste of time to change.
a real-mode assembler would indeed be easier than the #defines for the few dozen lines of
code that needs them but otherwise, not.  and if, as i understand it, the assembler is itself
written in assembler, that seems rather unattractive here.

just my own feelings about it.

[-- Attachment #2: Type: message/rfc822, Size: 2643 bytes --]

From: hooh pxw <electrorb@yahoo.com>
To: 9fans@cse.psu.edu
Subject: [9fans] flatassembler on Plan 9?
Date: Tue, 16 Sep 2003 04:28:21 -0700 (PDT)
Message-ID: <20030916112821.99028.qmail@web40405.mail.yahoo.com>

Hi,

Let me introduce fasm to you.

 The flat assembler is a fast and efficient *self-assembling* 80x86 assembler for DOS, Windows
and Linux and Menuetos. It supports all 8086-80486/Pentium instructions with MMX, SSE, SSE2 and
3DNow! extensions, can produce output in binary, MZ, PE or COFF format. Has the advanced but
easy to use macroinstruction support and does multiple quick passes to optimize the code for
size. It is self-compilable and the full source code is included.
http://flatassembler.net/
http://menuetos.org

So is there possibility flatassembler on Plan 9?

--

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9fans] flatassembler on Plan 9?
@ 2003-09-16 11:28 hooh pxw
  2003-09-16 11:28 ` Charles Forsyth
  0 siblings, 1 reply; 5+ messages in thread
From: hooh pxw @ 2003-09-16 11:28 UTC (permalink / raw)
  To: 9fans

Hi,

Let me introduce fasm to you.

 The flat assembler is a fast and efficient *self-assembling* 80x86 assembler for DOS, Windows
and Linux and Menuetos. It supports all 8086-80486/Pentium instructions with MMX, SSE, SSE2 and
3DNow! extensions, can produce output in binary, MZ, PE or COFF format. Has the advanced but
easy to use macroinstruction support and does multiple quick passes to optimize the code for
size. It is self-compilable and the full source code is included.
http://flatassembler.net/
http://menuetos.org

So is there possibility flatassembler on Plan 9?

--

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [9fans] flatassembler on Plan 9?
  2003-09-16 11:56 Tiit Lankots
@ 2003-09-16 15:35 ` jmk
  0 siblings, 0 replies; 5+ messages in thread
From: jmk @ 2003-09-16 15:35 UTC (permalink / raw)
  To: 9fans

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [9fans] flatassembler on Plan 9?
@ 2003-09-16 11:56 Tiit Lankots
  2003-09-16 15:35 ` jmk
  0 siblings, 1 reply; 5+ messages in thread
From: Tiit Lankots @ 2003-09-16 11:56 UTC (permalink / raw)
  To: 9fans

$ 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. 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [9fans] flatassembler on Plan 9?
@ 2003-09-16 11:47 Tiit Lankots
  0 siblings, 0 replies; 5+ messages in thread
From: Tiit Lankots @ 2003-09-16 11:47 UTC (permalink / raw)
  To: 9fans

> [snip]
>just my own feelings about it.

couldn't agree more. Plan 9 is almost assembler-free, and let's keep it that way.

Tiit


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-09-16 15:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-16 11:28 [9fans] flatassembler on Plan 9? hooh pxw
2003-09-16 11:28 ` Charles Forsyth
2003-09-16 11:47 Tiit Lankots
2003-09-16 11:56 Tiit Lankots
2003-09-16 15:35 ` jmk

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).