[futurebasic] [FB] Re: FB DropShell

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2000 : Group Archive : Group : All Groups

From: Chris Stasny <staz@...>
Date: Wed, 20 Dec 2000 08:32:10 -0600
>Hi Staz,
>
>Thanks for the comments on various aspects of "mini-app"
>code size.
>
>  > PPC requires PDEF tables that can't be omitted.
>  > Every toolbox call that you add is put in this
>  > table and fixed at runtime.
>
>Does it contain a lot of addresses that are *unused* by
>any one application, ie does it contain *all* the
>addresses that could ever be used by any FB^3 app?


It contains the address of every line that begins with "TOOLBOX"

>
>  > The reason 68K FB^3 is larger than 68K FBII is related to
>  > the new features that we have.
>  > In FBII you could not have include files (or DCODs, or
>  > SELECT CASEs or LONG IFs, etc.) that were over 32K.
>
>I have just used  SELECT CASEs or LONG IFs in my FB2
>mini-app D&D demo.  Maybe I have misunderstood?


68K code (in the past) always assumed relative branches of +/- 32K. 
That was OK in the early days. Now a branch table is built and 
resolved at runtime which can transparently make jumps beyond the 
size of a regular segment. (Your SELECT CASE is a prime example. 
After 32K, it would break in FBII but is correctly compiled in FB^3.) 
This takes RAM and (at least during startup) it takes some processor 
cycles. In return, it frees us from segment limits. This is just one 
of the things that changed in FB^3. There are many others. But you 
can see the direction that things are going. RAM is cheap. 
Programming time is valuable. I'm not saying that's how things should 
be or that I think I (or anyone else) has a license to become sloppy. 
It's just the road that computerdom has taken.

>
>  > The second thing relates to toolbox calls. The more of
>  > those you can throw out, the smaller your application
>  > becomes. FBII kept the toolboxes hidden from the
>  > programmer and slid them in line during compilation. FB^3
>  > uses the entire table to build its PDEF.
>
>So would it be fair to say that the FB2 mini-app setup
>offered "smart linking" where toolbox calls are concerned?
>While FB^3 does not, or not yet?


No. FBII placed toolbox functions and calls in line. The code was 
inserted every time you made a call. That is a bit like rewriting a 
function every time you need it, but is not so severe when you 
consider that there was not a lot of machine code associated with the 
insertion. It's yet another case of following where computerdom leads 
us. Toolbox calls are changing by the minute. The FBII way was a road 
map to extinction. The FB^3 way guarantees access no matter what 
Apple throws at us.

>
>  > In my 128 MB system (quickly becoming the standard amount of RAM on
>  > Macs) I don't worry about this as much as I used to.
>
>I do worry about the have-nots.  Pure selfishness:- I
>could join them any day.

Amen!



Best,

-STAZ  ~)~

800.348.2623 Orders  http://www.stazsoftware.com
228.255.7086 FAX     mailto:staz@...