Date: Fri, 20 Jul 2001 10:46:16 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: Sterten AT aol DOT com Message-Id: <2593-Fri20Jul2001104615+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp AT delorie DOT com In-reply-to: (Sterten@aol.com) Subject: Re: pokeb peekb References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Sterten AT aol DOT com > Date: Thu, 19 Jul 2001 15:22:05 EDT > > >> here is my final version, it compiles to about 90KBytes. > > > >Try stripping it, it will be much smaller. > > I don't (already) know how. From the DOS prompt, type this: strip myprog.exe where `myprog.exe' is the name of your program. See section 8.14 of the DJGPP FAQ for more details. > >> sometimes, but not always , I also need for compiling : > >> #include > > > >You need to include it always. > > #include > int main() { // gcc video3.c -o video3.exe > _farpokeb(_dos_ds,0xb8000+12*160+40*2,1);} > > compiles and runs fine. (gcc2.03) That's because you didn't turn on optimizations (the -O2 switch) and didn't ask GCC to print warnings (the -Wall switch). You probably don't want to change your program each time you modify the compilation switches, so I suggest to always include . Trust me, I know what I'm talking about. > >> it adds to the other code. How large can it be ? 500K ? > > > >About 25KB. > > I meant in total. So did I: 25KB is the total size of the startup code. > Actually our program is 478K and I'm starting to worry.. Then you don't have to worry about the overhead of the startup code. > >FAQ is for FREQUENTLY-asked questions. This one is only asked once, so > >far. It doesn't qualify. > > poking to memory is a rather frequent question, I think. > I found a lot in the mailing list archive Those questions you found _are_ in the FAQ.