On 19/02/12 23:01, Kirn Gill wrote: > Wow. Just wow. I am not keen on assembler, but I can quite well > understand what is going on here. OpenWatcom cdecl is nicer for > debugging because it generates a frame pointer on the stack. Fastcall > makes smaller (and likely faster) code. Both blow bcc away (which I'm > not even sure what all the code it's generating is doing, or much less > even needed) Well, bcc *is* a tiny compiler intended to run natively on 16-bit platforms, and Open Watcom is an 900kB behemoth... and even that's tiny compared to llvm. I'm not surprised bcc makes poor code. (Hey, look, there's an Open Watcom 16-bit C++ compiler! That'll be, um, useful.) > OMF is the Object Module Format defined by Intel for the 16-bit PC > OSes. It's nearly universal as a format during the 16-bit DOS, OS/2 > and Windows era. Watcom still uses it for two reasons: 1.) It has > support for segments, including in the OMF-386 variant. 2.) Near > universal compatibility with the vast majority of 16-bit development > systems for DOS, OS/2 1.x, and Win16 in existence. Yes, I figured that out eventually. I did find one guy who has some OMF patches for binutils: http://bpj-code.blogspot.com/2011/09/omf-support-for-binutils.html ...but it's not complete and he doesn't say which version of binutils it's for. TBH, the easiest approach to using Open Watcom would probably be to retool entirely for it: produce ELKS executables and a kernel image directly from their linker. At least ELKS doesn't have any shared library horrors to deal with, which means that the output files are fairly simple. No idea whether it's actually possible, though. PS. No need to cc me on replies --- I am a list subscriber! -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ │ "Never attribute to malice what can be adequately explained by │ stupidity." --- Nick Diamos (Hanlon's Razor)
Attachment:
signature.asc
Description: OpenPGP digital signature