Xref: news-dnh.mv.net comp.os.msdos.djgpp:2617 Path: news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!news.mathworks.com!news.kei.com!simtel!swidir.switch.ch!serra.unipi.it!mac-resta.iei.pi.cnr.it!user From: resta AT iei DOT pi DOT cnr DOT it (Giovanni Resta) Newsgroups: comp.os.msdos.djgpp Subject: Putting 200k of data in an executable ? Date: Fri, 13 Oct 1995 10:51:53 +0100 Organization: imc-cnr Lines: 27 Nntp-Posting-Host: mac-resta.iei.pi.cnr.it To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp I will like suggestions on how to solve this problem. I made a program that make use of an external binary file of, say, 200k-300k. That is, the program starts, reads in memory this file, that is always the same (it does not change between executions) and then proceed. I was wondering if I can use just one file, that is putting somehow the data inside the executable. I remember that some years ago, I tried to do something similar with another compiler. I tried to statically initialize a big array of chars. In practice I wrote a program that given a file will create a source *.c that statically initialize an array with the data of the file. However this approach failed on larger dataset, due to some limitation of the compiler. I wonder if djgpp, with its lovely flat model,\r has limitations of this kind. Another approach that I'm considering is to append physically the data file at the end of the executable and then finding a way to access it directly, but I do not know if in that case the data will be automatically loaded somewhere in the memory (where !?) or if I must read it from the disk peeking toward the end of the "extended" executable file. Suggestions are all wellcome. I'm quite a good C programmer but also quite new to djgpp and absolutely ignorant about my 586 asm. Giovanni. resta AT iei DOT pi DOT cnr DOT it