Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Oct 1998 19:15:10 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Andrzej Bialecki <abial@nask.pl>
Cc:        Mike Smith <mike@smith.net.au>, current@FreeBSD.ORG
Subject:   Re: New boot loader and alternate kernels 
Message-ID:  <199811010315.TAA00686@dingo.cdrom.com>
In-Reply-To: Your message of "Sat, 31 Oct 1998 23:59:13 %2B0100." <Pine.BSF.4.02A.9810312350190.4240-100000@korin.warman.org.pl> 

next in thread | previous in thread | raw e-mail | index | archive | help
> On Fri, 30 Oct 1998, Mike Smith wrote:
> 
> Here it is: it's called FICL (Forth Inspired Command Language), written in
> ANSI C, designed to be embedded in other programs, implements ANS-Forth
> CORE, CORE-EXT, TOOLS, SEARCH wordlists and its own OOP extensions. You
> can find it on taygeta. It's freeware, and actively maintained.

Yes, I looked at it before.

> Because of its purpose, it comes in a form of library. Here is its
> contents:
> 
> abial# size libficl.a
>    text	   data	    bss	    dec	    hex	filename
>    2403	      0	      0	   2403	    963	dict.o (ex libficl.a)
>     989	     20	      0	   1009	    3f1	ficl.o (ex libficl.a)
>     892	      0	      0	    892	    37c	math64.o (ex libficl.a)
>      63	   3130	      0	   3193	    c79	softcore.o (ex libficl.a)
>     674	      0	      0	    674	    2a2	stack.o (ex libficl.a)
>     253	      0	      0	    253	     fd	sysdep.o (ex libficl.a)
>    2154	     44	      0	   2198	    896	vm.o (ex libficl.a)
>   18222	     92	      0	  18314	   478a	words.o (ex libficl.a)
> 
> (this can be still reduced if we limit ourselves to CORE words - I think
> 1/3 of words.o would go away).

It builds a little bigger here; it weighs in at about 40k.  If you 
strip the OO extensions out it comes down to about 22k.  I don't know 
whether there's much we can strip from the core wordset; I'll leave 
that for the FORTH guruen to argue over.  At 22k (plus whatever it 
costs to bind it in) I think we have a goer.  Doug's resolved the Alpha 
space issues too, so it should be comfy.

> I haven't tried to link it against libstand, and you probably know better
> than I what is and what is not possible with it, so below is list of
> the symbols it needs from libc, when linking a simple test program:
> 
> abial# nm testmain|grep "U "|sort -u
>          U ___runetype
>          U ___tolower

These are ctype noise; the libstand ctype replacements are simpler 
(more stupid).

>          U __assert

We need an assert.

>          U atexit
>          U exit

There's no exit callout yet, but this looks like it may be noise as 
well (there are no calls in the library)

>          U fputs
>          U puts

These are in the sysdep shim, and a trivial putchar() routine solves 
that.

>          U free
>          U malloc
>          U strcat
>          U strcmp
>          U strncpy
>          U sprintf
>          U vsprintf

Easy enough; we need to grow a vsprintf though.

>          U longjmp
>          U setjmp

These could be tricky; I'll have to look at how the Alpha does them to 
be sure.  Worst case I guess they just come in from libc; they should 
be self-contained.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811010315.TAA00686>