Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!brolga!uqcspe!cs.uq.oz.au!warwick From: warwick@cs.uq.oz.au (Warwick Allison) Newsgroups: comp.sys.atari.st.tech Subject: Re: How store extra data at the end of an executable? Message-ID: <615@uqcspe.cs.uq.oz.au> Date: 8 Apr 91 00:07:01 GMT References: <5796@mcrware.UUCP> Sender: news@cs.uq.oz.au Reply-To: warwick@cs.uq.oz.au Lines: 27 In <5796@mcrware.UUCP> erik@mcrware.UUCP (Erik Johnson) writes: >Here is what I would like to do. I would like to append a picture file to the >end of my executable file. In this case, the extra data is a picture file that >is the menu for my program. Once a program is loaded into memory, is it closed >and all file offset information lost, or is there a way I can start reading >data from the file where the program data left off. Try: 1. Generate your .PRG (eg. with C or M2 linker, etc) 2. Have a separate program to: a) Fseek to the end of the .PRG file b) append any other data Your program should Fseek backwards from the end of the .PRG file, to the start of the additional data, then read it. This will work, provided the additional data does not confused the loader. If it does, then I'm stumped, I'd assume the loader ignores additional data. Warwick -- _--_|\ warwick@cs.uq.oz.au / * <-- Computer Science Department, \_.--._/ University of Queensland, v AUSTRALIA.