A86: Attention! Module Draft Available


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

A86: Attention! Module Draft Available



On Thu, 11 Sep 1997, Joseph Gaffney wrote:

> Bill and Dan have been discussing the use of loaders, etc, and have broken
> it down a bit.  Bill is wondering if it would be preferred to have single
> modules or larger libraries (modules being smaller, more customizable, has
> a greater advantage (my opinion ;-)...))


Well guys, I've edited the A86 standard page to use modules.  In doing so,
I've discovered (and remembered) a some reasons why we should use 
libraries instead.  They all boil down to the *need* to export more than
one "thing" (code or data).  Here are a couple examples.

1.  A module contains a function called PutSprite that performs the
obvious task.  Fortunately, the programmer was really smart and decided to
make it flexible so that he can make it XOR, AND, or OR sprites to the
screen.  The way the function decides which logical operation to perform
is by checking a variable.
    Now, it's just fine for him to include a .db in his module that the
function checks, but how is the program that uses the module going to know
where that .db is?  It needs to be exported in addition to the function. 

2.  Some functions depend on other functions.  If we limit our modules to
one function, they will have to have their own import tables.  This makes
a ballsup of the load sequence.  (Do you *really* want to program a
recursive load sequence, Bill?)

Now, I'm all for keeping libraries as simple as possible to avoid memory
wastage, but there are situations for which we need multiple exports.

I did add one useful thing to the standard... I put a standard file
header on modules and included a module version byte so that a program
can request "FindPixel, version 1 or higher."

            -----------------------------------------
            http://www.cis.ohio-state.edu/~eble/ti86/
            -----------------------------------------

Comments are welcome.

--------
Dan Eble (mailto:eble@cis.ohio-state.edu)
         (http://www.cis.ohio-state.edu/~eble)

"People disagree with me.  I just ignore them."  -- Linus Torvalds


Follow-Ups: References: