Re: Kernel size over 64K: what is needed, how to implement?

David Given <[email protected]>
Newsgroups org.kernel.vger.linux-8086
Message-ID <[email protected]>
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)
signature.asc (application/pgp-signature, 254 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFPQZklf9E0noFvlzgRAtusAJ99uIogw0F8fS5nPDn0mwUpIDkvpQCeIXQz
/23+pLnrBa2GTdh1QK9udOs=
=G4+w
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.