Audit all sti/cli calls. Look into ways to reduce stack usage. For example, %esp, %ebp, %esi (high bits), %edi (high bits) are already restored by the C code if they're changed - they probably don't need to be backed up on entry. Code assumes ebda segment is static - it doesn't read 0x40e. See if using an ld script for 16bit mode is a good idea. The __call16 code does a long jump to the interrupt trampolines - this is unnecessary. Fix makefiles so that they rebuild the required files automatically. Cleanup setting of ES on GET/SET_BDA Make sure inline assembly isn't preventing inlining of calling functions. Convert remaining parts of rombios.c to new code. Convert rombios32 and apm bios stuff to new code. Allow one to select adding 32 bit code to 0xf000 or in a separate location. Try generating bios tables at compile time. Move e820 map generation to post time (just have e820 code copy pre made tables back to user).