[fpc-pascal]How to shrink the executable size?

IoDream IoDream at ifrance.com
Tue Oct 3 23:46:04 CEST 2000

          Sorry to be a lite late on this topic, but it seems that one
question wasn't answered: how to use PMODE/W instead of CWSDPMI. Here is
the answer (short version here) that "Balogh, Karoly (Charlie/INQ)
<charlie at scene.hu>" sent on the list three months ago.

<<<< Stubify.bat >>>>
exe2coff %1.exe
upx %1 -f -9 --coff
copy /b /y \pp\bin\go32v2\pmodstub.exe+%1 %1.exe
<<<< End of Stubify.bat >>>>

   You can find Exe2Coff and Pmodstub in the DJGPP archives, for example
... it's the binary
... and the sources of pmode/w.

   Don't forget to change the path in the batch file at pmodstub line, and
make sure exe2coff and upx are your the path (on my computer, these files
are in $FPCDIR\bin\go32v2).

   If you want further help, ask for charlie (email above). I would be happy
to post you the exe files by email, just send me the request ;) , I'm
IoDream at ifrance.com.

   Note: this of course only works in 32bits DOS mode, like using FPC or TMT
(or VP).

          Good FreePascal Programming,

----- Original Message -----
From: Sebastian Schuberth <s.schuberth at gmx.net>
To: <fpc-pascal at lists.freepascal.org>
Sent: Saturday, September 30, 2000 2:02 PM
Subject: [fpc-pascal]How to shrink the executable size?

> Hi there,
> unfortunately the link to the mailing list archive seems to be broken,
> so I'm not able to look whether my question has been answered before.
> The size of (DOS-GO32V2) executables still is (even after applying the
> optimizations mentioned in the FAQ) very large, a simple test program
> with a single "ClrScr" and "WriteLn" statement is about 62 KB. When I
> use UPX to compress it, it shrinks to 26 KB, but still the external
> CWSDPMI.EXE is required. Exactly the same source compiles under TMT
> Pascal, which uses the PMODE/W extender and PMWLITE for compression, to
> 25 KB (extender INCLUDED, so no need for an additional external file).
> If
> you guys don't have any other idea how to further shrink FPC's files,
> I'd like to try to use PMODE/W instead of GO32V2 with FPC. Is it
> possible? What steps do I need to take? I already guessed that I need to
> compile to OBJ instead of COFF format. I used the -Anasmobj switch to
> archive this (yes, I have nasm installed properly). Unformtunately the
> linker then complains about some format
> error ... any suggestions how to fix that? And will the resulting
> executable be useable with PMODE/W?
> Thanks in advance!
> --
> Sebastian Schuberth
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Vous avez un site perso ?
2 millions de francs à gagner sur i(france) !
Webmasters : ZE CONCOURS ! http://www.ifrance.com/_reloc/concours.emailif

More information about the fpc-pascal mailing list