Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Old 8086 version of pcc spotted (cross-compiles to DOS) (Miscellaneous)

posted by Rugxulo(R) Homepage, Usono, 22.03.2012, 08:38

> > Limited C subset
> > ================
> > Ron Cain's Small C 8086/8088 ports (original published in DDJ)
> > * Project -fbin (diff. versions, req. nasm, modern)
> > * Small C 2.1 - 2.2 (by James Hendrix, shareware, improved)
> > * BYTE Small-C 1.0 (Rick Grehan, BYTE Mag., req ms link/masm)
> > * Caproc Small-C (8088, req. ms link/masm)
> Could you point out the versions of project-fbin CC you found?
> Or even point out how to build one of them?
> The documentation is close to useless for installing...
> There is a libc that suffices to bootstrap, though.

I assume you're not asking me, but a quick Google search found this (though I have not tried it):

> Small C is subset-K&R, FWIW.
> My point in mentioning the PCC-8086 compiler was:
> 1-it's a BSD-ish 16bit compiler (mentioned for cm's sake)

But is cm needing / wanting such a thing? All I knew of was him hacking at RxDOS in NASM, not expecting to use C for anything.

> 2-it might be helpful in porting the PCC "Ragge version" to target 16-bit
> (the latter does support segmented modes to some extent-the PDP11 is a
> 16-bit CPU with 6 extra bits for a 4MB total address space)

The old one above from 1983? Or do you mean latest PCC 1.0 from a year or two ago? Unlikely to be ported either way, most people would just use OpenWatcom (whose license is still OSI approved, at least).

The 16-bit memory models aren't as popular these days, esp. since 32-bit and 64-bit modes have become the norm thanks to *nix and WinNT. If you have specific memory model requirements for something, it might be easier to just use assembly (if pre-existing C compilers like OpenWatcom don't fulfill your needs). At least there you have 100% control. If you want a bit of HLL flavor, some good HLL macros for NASM or FASM can somewhat ease the transition.

> DJGPP et al. are exactly what this isn't about. They can't compile a
> kernel, are 32-bit and single-segment, and aren't nearly as liberally
> licensed.

DJGPP can probably compile some kernels, but obviously not FreeDOS (compact model) without heavy tweaking. Is that what you wanted? What kernel did you want to build? Or are you writing from scratch?

> I'm considering putting together a NASM + -fbin CC + *BASIC compiler
> floppy, that's a development environment in a few languages...might extend
> the libc a little in the process.

If you're only wishing to hack a bit for fun, something like EiC or PicoC (both interpreters) would be better. But that's not as helpful if you really want to write low-level kernel code natively.


Complete thread:

Back to the forum
Board view  Mix view
15317 Postings in 1383 Threads, 254 registered users, 22 users online (0 registered, 22 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum