home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!decwrl!csus.edu!netcom.com!netcomsv!terapin!paulk
- From: paulk@terapin.com (Paul Kienitz)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Loading functions from disk
- References: <1993Jan23.155251.13537@syma.sussex.ac.uk>
- Message-ID: <paulk.3gta@terapin.com>
- Date: 25 Jan 93 20:22:22 PST
- Organization: BBS
- Lines: 18
-
- >I want to write a program that works in a modular way and loads the
- >correct module from disk as and when I want it.
- >
- >Each module wione or more functions for
- >doing a specific task.
- >What I want to do is load in a file from disk, pointer a pointer to a
- >function at the memory I loaded it into and call the function.
- >
- >What is the easiest way of doing this?
-
- The simplest method is to simply make sure that the mini-program you write that
- contains the function just has its entry point as the very first thing in the
- first hunk. Just make sure that the first thing that gets compiled in the
- first module that gets linked, is your entry point.
-
- Bars&Pipes pipetools work this way. So, you simply call as a function the
- address that would normally be the start address of the program -- the
- beginning of the first hunk in the seglist, which is BADDR(seglist + 1).
-