>> Most probably because you use printf(). > It seems, not too much I can do about this using Turbo C:
> 1. Compilation of "Hello, world!" containing "printf" gave around 370 > bytes for OBJ, and 8.3k for EXE. > 2. The same when replaced "printf" with "puts" gave 6.4k for EXE. puts() is essentially puts (char *s) { fwrite(s, strlen(s), 1, stdout); } so this still uses the stream IO functions, including malloc(). start by generating (and reading and understanding) the map file. > Yes, the difference is noticeable - still it's not as big, as one could > expect. > Probably Watcom compiler is able to produce smaller binary, but I > didn't try it yet. > Who knows, maybe for Turbo C the best solution for this would be to > code one's own simplified "puts" directly in assembly. there is zero need for assembly here; for beginners: my_puts (char *s) { write(1, s, strlen(s)); } will make your exe significant smaller. look at the source of MORE or CHOICE for some more tricks. Tom ------------------------------------------------------------------------------ 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 http://p.sf.net/sfu/Bonitasoft _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user