Hi, see http://freedos.sourceforge.net/kernel/exeflat.c (the file is smaller than the diff would be)
This comes from some discussions with Lucho a few months ago when I saw that UPX is much better compressing COM and SYS files than EXE files, so when the uncompressed kernel.sys is smaller than 64K we can save a bit of space for the compressed kernel.sys (about 2K). Before compression/exeflat worked like this: * upx kernel.exe * exeflat kernel.exe to kernel.sys * add header and trailer Now it works like: * exeflat kernel.exe to kernel.sys * if result < 64K replace the first bytes by a SYS header, else prepend a small EXE header with no relocations * upx this result * if it's an EXE, exeflat this file again * add header and trailer To use it you need to change the makefile to remove the explicit UPX call: this call is done via system() in exeflat.c now. Depending on the kernel flavour and compiler the uncompressed version is always less than 64K for the FAT16 version, but for the FAT32 it may be bigger (depending on stable/unstable/386...). Even for the > 64K case there are a few savings: about 130 bytes because the relocations are done by exeflat now, and not UPX' stub. Bart ------------------------------------------------------- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
