Mail Archives: djgpp/2001/07/20/04:01:07
> 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<farptr.h>
> >
> >You need to include it always.
>
> #include<go32.h>
> 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 <sys/farptr.h>. 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.
- Raw text -