Hi, I think it is now clear that Turbo C 2 cannot optimize for 386. HOWEVER, the NASM parts can still be optimized for 386. So instead of generating an error message when you try to create a 386 kernel with TC2, I suggest displaying only a warning message and let at least the NASM parts be 386ish.
This reminds me that the non-resident part of the kernel should, if possible, show an error message if you try to run it on an incompatible CPU. That can be done quite early in the assembly language loader part before the C part gets used. By the way, I recently saw something about 32bit and 64bit multiply / divide code... where is it used? Is it performance-critical? Especially the 64bit thing seems to be quite heavy, maybe one could check where it is used and try to optimize it down to a bulk "32bit/32bit=32bit" division in most cases (xor edx,edx input eax/ebx div ebx output eax remainder edx)? Sure, 32bit/16bit=16bit will often not be enough, but 32/32=16 should. Bonus WISH for "all-time enabled debugging code": Please add - a register dump for the invalid opcode handler (now often only a small part of the stack dump reveals useful information). If naming the registers takes too much effort, you can instead use "pusha" (or 8086 equivalent for 8086 kernels) right before doing the stack dump. That will mean only VERY small increase in code size. You will need to document "what do the numbers displayed at invalid opcode message mean?" for this small implementation, but documentation takes zero resident kernel RAM :-)). - the caller IP should be displayed for "too many near fnodes" panic message. It is very hard to find the reason of the panic otherwise. Thanks! Eric ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel