Re: A86: Libraries and Loaders


[Prev][Next][Index][Thread]

Re: A86: Libraries and Loaders



> I have a real problem with AShell saving a program back automatically.
> I agree that it is a useful feature, but it does not belong in the shell,
> and it DEFINITELY should not be invoked involuntarily.  A shell should run
> programs just like the TI system does, and do absolutely nothing more.

If you think about it, programs that import functions cant be called by
the TI system anyway.  Actually it does belong in a shell, because the
shell already contains:

The program's location and ram pages
The program's size

I could make a function in memory to save the prog, but this function
doesnt belong in a library.

> Functions like program write-back should be stuck in a standard library.
> This would provide functionality, without forcing it upon programs that
> don't use it.  Also, because there would be only one copy of the library,
> the programs would be smaller.

I'm working on adding AShell support for libraries.  I think it will
save a lot of memory if libraries held only one function, plus it would
making writing programs that import functions easier.  Martin Hock was
telling me how most programs that share libraries for Usgard dont even
use all of the functions, what a waste of memory!
 
> >From our previous discussion, I have made up a draft of the data
> structures for our standard programs.  Please take a look, ask questions
> and make suggestions.  You can find the draft standard at

I really like how you've taken all of our ideas and put them in one
place to organize things.  I have a little suggestion about the fixup
table:

> Each element in the fixup table points to an address that must be changed when the function is relocated.

If the library starts with a .org $8000 then anything in the range of
$8000 - $BFFF would be relocated, because there is no reason that any
function would make a call or jump into that area.

Bill


Follow-Ups: References: