home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5246 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: sundog.tiac.net!usenet
  2. From: Darius Taghavy <dart@ycrdi.com>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Plugs Ins
  5. Date: Mon, 11 Mar 1996 18:49:42 -0500
  6. Organization: The Internet Access Company
  7. Message-ID: <3144BC16.2C80@ycrdi.com>
  8. References: <Pine.SOL.3.91.960307160455.27918A@sirius> <Dnws3v.7o0@cix.compulink.co.uk> <3144821E.794B@dmu.ac.uk>
  9. NNTP-Posting-Host: gatekeep.ycrdi.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Macintosh; I; PPC)
  14. CC: dart@ycrdi.com
  15.  
  16. Timothy Eves wrote:
  17. > Any way I've checked and found out a way doing this using LoadSeg()
  18. > A seglist as returned by LoadSeg will has this structure:
  19. >         LONG pad        ;aligns the seg to long word boundry
  20. >         LONG size       ;How big this segment is
  21. >         APTR next_seg   ;The next segment in this seglist.
  22. >         start of code
  23. >              .
  24. > If you do a load seg you can then jump 3 LongWords into the pointer returned
  25. > by LoadSeg() and start execution from there.
  26. > When you write you're code just make sure the 1st hunk of the object file
  27. > contains you're start code and the 1st code line is a function.
  28.  
  29. Yes I believe the code has to be *somewhere* in the first hunk, but the first location 
  30. after the SegList header structure does not have to be a function! It could also be 
  31. global data. Since you know the size of your data segment (after all you defined it!),
  32. you can simply jump over it.
  33.  
  34. #####################################################################################
  35. ############## Darius Taghavy ### dart@ycrdi.com ####################################
  36. #####################################################################################
  37. ### Day Job:   Software Engineer, Young Chang R&D Institute (Kurzweil Technology) ###
  38. ### Night Job: Professional Amiga Songwriting Application Development             ###
  39. ### Past Jobs: Software Engineer for Commodore-Amiga and Ensoniq                  ###
  40. #####################################################################################
  41.