delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/20/04:01:07

Date: Fri, 20 Jul 2001 10:46:16 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
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: <bc.17884332.28888d5d@aol.com> (Sterten@aol.com)
Subject: Re: pokeb peekb
References: <bc DOT 17884332 DOT 28888d5d AT aol DOT com>
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

> 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 -


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