delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/13/15:16:52

Newsgroups: comp.os.msdos.djgpp
From: Elliott Oti <e DOT oti AT stud DOT warande DOT ruu DOT nl>
Subject: Re: 64k demo
Sender: usenet AT fys DOT ruu DOT nl (News system Tijgertje)
Message-ID: <358305BC.61AB@stud.warande.ruu.nl>
Date: Sat, 13 Jun 1998 23:05:32 GMT
References: <35819A38 DOT C1BA3FCB AT hotmail DOT com>
Mime-Version: 1.0
Organization: Organz Are Private
Lines: 48
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Archee/CoNTRACT wrote:
> 
> Two guys made a demo only 64k with real time generated animation.
> Most of 64k demos were made in assembly only.
> I saw, they used __asm__(" ... "); a lot.
> 
> I think, it is not a good idea to make 64k demo in DJGPP
> Because: the CWSDPMI takes 25Kb
>          and djgpp produces too big exes for this. (sizeof "hello world"
> too big)
> 
> How did they do that ?
> What linker did they use ?
> I think, they have got their own smaller extender.
> They were beginner in PC.(they came from Amiga)
> 
> What is the way to use DJGPP in a 64k intro ?
> 
> I only can use WATCOM for this by using the extender called PMODE BY
> TRAN
> without default libs.(and some small asm lib)

Some idea's for keeping the size down:

* Use the PmodeDJ extender instead of cwsdpmi and merge it with your
executable.
(Get it from the same place you got djgpp)
* Strip the executable (strip myexe.exe)
* Use djp to compress the executable (get from same place you got djgpp)
by about 40%
* Don't use C++, use only C.
* Call as few libc functions as possible, and where possible replace
them with short inline assembler eqivalents. This is not to say the libc
functions are inefficient, but they may in turn call other functions, or
set up error-handling code, or atexit() functions etc. We all know error
handling is unneccessary -- Ctrl-Alt-Del is there to handle errors for
us :-)
* Take it easy on static arrays and static global variables and try and
allocate as much dynamically as you can.
* See the FAQ for more ideas on reducing code size.

4K, 16K, and probably also 32K demo's are impossible with djgpp, but I
think you could pull off a decent 64K demo stunt with plenty of good
effects. I would love to see the result if you can make one :-)
 
Cheers,
------------ Elliott Oti ---------------
   ------------- http://www.fys.ruu.nl/~oti  ---------

- Raw text -


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