About size - you should probably get it down a few KiB by compiling into a COM binary. From what I saw, you don't use any memory segments, just (plenty of) INT calls, so a COM would fit perfectly. Just add -mt -lt to your tcc call. And since you don't use any floats, you might also try to pass -f-.
+of course try UPXing it - you'r likely to shave off a few KiBs again. If that's not enough, then you still have the option to rewrite it into ASM this time ;) Mateusz On 06/28/2014 02:45 PM, Zbigniew wrote: > Solved - the problem was in totally different place, than I was > looking for it: misdeclaration of variable types in auxiliary function > "holeParameter". It should have been look like this: > > void holeParameter(unsigned char *pzeilen, unsigned char *pspalten, > char *argv[]) { > unsigned char sp_allowed[] = {40, 80, 94, 0}; > unsigned char ze_allowed[] = {25, 30, 34, 43, 50, 60, 0}; > unsigned char *arrptr; > unsigned int tmp; > > /* Zeilen und Spalten aus der Kommandozeile holen */ > sscanf(argv[2], "%u", &tmp); > arrptr = sp_allowed; > while (*arrptr) > if ((unsigned char)tmp == *arrptr) { > *pspalten = *arrptr; > break; > } else > ++arrptr; > if (*pspalten == 0) { > printf("Niedozwolona liczba kolumn - %s\n", argv[2]); > exit(0); > } > > sscanf(argv[1], "%u", &tmp); > arrptr = ze_allowed; > while (*arrptr) > if ((unsigned char)tmp == *arrptr) { > *pzeilen = *arrptr; > break; > } else > ++arrptr; > if (*pzeilen == 0) { > printf("Niedozwolona liczba wierszy - %s\n", argv[1]); > exit(0); > } > } > > One more thing, that I still don't like, when comparing to Pascal > version, is the executable size. TP5 produced small 4k executable, > while TC2.01 produced executable of 14k size. :/ > ------------------------------------------------------------------------------ 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