Re: A82: Re: Libraries


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

Re: A82: Re: Libraries



Right. There are 3 kinds of libs I can think of: 1) an include file you put at
the bottom of your program. This ends up having wasted space if you have several
programs using the same routine. 2) An extra .85s or 82p file on your calculator
for each routine or groups of routines. I think this is what usguard did This
lets you have only what you need, but is a pain to organize. 3) The shell itself
has a set of core, often used functions built into it. Everyone has these, thus
there is no management hassle at all (You have no choice in the matter of what
routines to put on), and the routines only need to be on the calculator once.
Also, the routines are at a fixed address, and you always know where they are,
unlike (2). However, if there are unused routines, you waste space.

I think #3 is the best solution, and that was what I was talking about. Pick a
set of core functions, optimize the hell out of them, include them, and tell us
where they are inside the Ash 82p. For example, you may want to include Point
on, off, chg and getpixel as they are quite usefull for small writes. The only
downside is additional space is taken up for those who use a single program.
But, it would shave 100 bytes of games using the routines, with none of the
hassle people on the 85 hated. Not to mention most people at school have no idea
what functions are on their calculator, they just know if a game is big/slow
slow/fast and boring or not.

Dines Justesen wrote:

> When usgard .95b was released it included library support, so all programmes
> could just call the libraries for commonly used rutines. Libraries also had
> the advantage that you only had you the rutines on the calc that you needed
> for the programs you where using. The only problem with this was that no one
> wanted it ! Most people thought it was way too complicated with all these
> libraries on the calc, and therefore it was removed in usgard 1.0. Most
> programmers liked having libraries because it was alot easier to program
> using them, but besides them no one really liked it. Usgard 1.x includes a
> number of obj files which you can use in your program, and this makes it
> just as easy for the programmer as when you where using libraries. The big
> difference is that now the progra,s does not share the code, which makes
> every program bigger. If people on the ti85 hated libraries why should
> poeple on the ti82 like them ? Most people on this are probably programmes
> and would like the idea, but generally i think people would think that this
> was a bad idea. Therefore i think libraries are a bad idear.
>
> As i wrote earlier it might be a good idea to change the romcalls so
> programmes can use normal calls even if it takes up a bit more space. Jason
> and i will discus this and mybe it will be included in the new shell. Usgard
> has added some of the very used functions in the core of the shell. This of
> cause makes the shell a bit bigger, but if just one program uses each
> function it saves space. this could be done on the ti82 too, but i depends
> on what people want.

> t think it is a good idea to require that all functions preserve all
> registers, in a lot of cases it is not nessasary to save them all, so it
> just takes up more space and makes the function slower.
>
> Dines




References: