home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / amiga / programm / 19195 < prev    next >
Encoding:
Internet Message Format  |  1993-01-26  |  1.2 KB

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