Re: [cc65] Memory impact of Atari library compile time defines

From: Daniel Serpell <daniel.serpell1gmail.com>
Date: 2009-11-23 04:01:30
Hi!

On Thu, Nov 19, 2009 at 7:59 PM, Christian Grössler <chris@groessler.org> wrote:
>
[...]
>
> Ok, I moved some initialization parts from crt0.s to constructors.
> Namely the initialization of stdin/stdout/stderr and the retrievement of
> the default (floppy) device.
>
[...]
>
> New memory consumption (current svn):
>
> default configuration:
>
> -rw-r-----  1 chris  wheel   291 19 Nov 23:09 empty.com
> -rw-r-----  1 chris  wheel  3150 19 Nov 23:09 hello.com
> -rw-r-----  1 chris  wheel  2054 19 Nov 23:09 open.com
>

Here are 3 patches to further reduce the size of the executables,
the patches are in git format (from a mercurial clone of the SVN
repositry).

Patch 4062: The proposed patch by Ullrich, remove one byte from crt0.s
Patch 4063: Reves 3 bytes from open, based on cbm code.
Patch 4064: Move fdtoiocb out from fdtable.s, so that code that don't
use file IO does not need the whole fdtable file (this is huge).

With the attached 3 programs, the size went from:
-rw-r--r-- 1 daniel daniel 291 2009-11-22 23:06 empty-atari
-rw-r--r-- 1 daniel daniel 2254 2009-11-22 23:06 fileio-atari
-rw-r--r-- 1 daniel daniel 3150 2009-11-22 23:06 printf-atari
-rw-r--r-- 1 daniel daniel 1243 2009-11-22 23:06 put-atari

To:
-rw-r--r-- 1 daniel daniel 290 2009-11-22 23:46 empty-atari
-rw-r--r-- 1 daniel daniel 2253 2009-11-22 23:46 fileio-atari
-rw-r--r-- 1 daniel daniel 2744 2009-11-22 23:46 printf-atari
-rw-r--r-- 1 daniel daniel 837 2009-11-22 23:46 put-atari

The same files for C64 are:
-rw-r--r-- 1 daniel daniel 335 2009-11-22 23:46 empty-c64
-rw-r--r-- 1 daniel daniel 1981 2009-11-22 23:46 fileio-c64
-rw-r--r-- 1 daniel daniel 2688 2009-11-22 23:46 printf-c64
-rw-r--r-- 1 daniel daniel 749 2009-11-22 23:46 put-c64

The patch 4063 includes copying from fdtable.s to fdtoiocb.s and then
removing the rest of the code, so to apply, you need first to
"svn cp fdtable.s fdtoiocb.s".

    Daniel.

PD: I copied the email to you because I don't know if the mailing list
will allow the attachments.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Nov 23 04:01:39 2009

This archive was generated by hypermail 2.1.8 : 2009-11-23 04:01:41 CET