delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/16/23:34:21

From: Robert Hoehne <Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Bin2obj for DJGPP?
Date: Wed, 13 Aug 1997 10:50:43 +0200
Organization: TU Chemnitz-Zwickau
Lines: 32
Message-ID: <33F17563.27859E7@Mathematik.TU-Chemnitz.DE>
References: <33eef535 DOT 630416 AT news DOT su DOT se> <33EEF901 DOT DB5BE87 AT Mathematik DOT TU-Chemnitz DOT DE> <33EF4185 DOT 2B070617 AT grub01 DOT physto DOT se>
NNTP-Posting-Host: pandora.hrz.tu-chemnitz.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

TW wrote:
> 
> The binary files I want to add to the exe-file is just small data-files
> wich I want to access by pointers. For example sprite-objects, fonts,
> palettes etc.

As you don't want to use the bin2h you have to write your own
converter. Here are some ideas from how it can be done:

Your converter should examine at first the size of the
binary files. Then create an assembler source file
which contains only a global data symbol with the 
needed size of the binary file. Then run gas to compile
the file (which produces the .o file) and now you have
to analize the header information of the .o file to
get the fileposition where the dummy data is hold and
then simply copy the data from the binary file to that
location. Now you have a normal object file with a
global data symbol which can be used by your program.

BTW: These are aonly some ideas from me. Please do not
ask me for details, because I have not the time for it.
This time should be invested by you.

Robert
-- 
*****************************************************************
* Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau *
* Post:    Am Berg 3, D-09573 Dittmannsdorf                     *
* e-Mail:  Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE              *
* WWW:     http://www.tu-chemnitz.de/~rho                       *
*****************************************************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019