Hallo Herr Zbigniew,

am 29. Juni 2014 um 02:35 schrieben Sie:

> 2014-06-29 1:13 GMT+02:00, Rugxulo <rugx...@gmail.com>:

>> Turbo Pascal has a smartlinker while Turbo C does not.
Turbo C linker is about as smart as Turbo Pascal.

> Indeed I noticed even earlier, that OBJ is of "decent size" (just a
> little more than 4 KB), and it must be a linker, which "glues" some
> additional library to final EXE. Most probably because I had to
> include dos.h (int86 function in use).

Most probably because you use printf().

Just compile the infamous

   main() {
      printf(" hello world\n");

and look at the map and .exe size. You'll see that this is fairly large.

printf() has a lot of non-trivial formatting options (including
%d, %5d, %*d, %5.5d,%-5d, %-05d, ..., float, ), and is fairly large
even if implemented efficiently.

in addition printf() writes to *stream* stdout, and usually pulls in
malloc() and friends, fwrite() and friends, and possibly even some
more stuff.

that's the reason why MORE, CHOICE, and some more FreeDOS programs use
PRF.C and TALLOC.C for a much smaller footprint compared to using
standard printf()


Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
Freedos-user mailing list

Reply via email to