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, 20:34

> Comment made in private email: I asked about RxDOS because the fact that
> FreeDOS uses a "non-free" compiler to build means that dosemu is
> questionable for FSF-approved distros; he said it wasn't ready and probably
> would never be, and commented that a free compiler would be the best
> solution, then started pondering about whether there are any BSDish C
> compilers that could readily be ported to DOS or already target DOS.

If your goal is just to get DOSEMU accepted in a distro, it's unlikely to happen: DOSEMU is a second-class citizen to Linux as they prefer native binaries. It's still on like disk #8 (or whatever) of Debian, but you're unlikely to find it beyond that anywhere else. (And there are weird bugs and incompatibilities in other areas, e.g. SELinux under OpenSuSE, so most people don't bother.)

Yes, some people wrongly say DOSEMU is non-free, which is a lie, but they reject the OSI-approved Sybase v1 license, hence OpenWatcom, hence FreeDOS, hence DOSEMU as a whole. Also, RMS even considers x86 native BIOS (except Coreboot??) to be non-free, so he only uses a Leemote (sp?) cpu with gNewSense. So even native DOS (preferred environment) is non-free to him.

The path of least resistance would be to just keep using OW privately and/or create your own Linux distro. (99% of Linux distros are non-free anyways, e.g. binary blobs.)

The FreeDOS and Linux kernels have the same license, but by far Linux is heavily preferred, esp. by FSF/GNU, and that's unlikely to change, even with a "free-r" compiler, sadly. I.e., you're unlikely to ever see FreeDOS + DJGPP as a tier one target for GCC.

> I mean, PCC 1.x still has support for cross-compiles to PDP11 (which is a
> segmented-mode 16-bit CPU). So you don't need to worry about whether
> 16-bit support is popular or feasible; it's already there even in the newer
> versions.
> Perhaps the version could serve as a reference to retarget PCC 1.x
> for DOS/16; this might hypothetically allow a DOS/32 -> DOS/16
> "cross-compiler". seemed to only output .COM and not touch any segment registers, so that's only tiny model, which is available elsewhere (BCC/Dev86).

> A compiler that could build a 16-bit DOS kernel (ie, real mode + supports
> segmented modes). Freedos is an example of the type of kernel.

Probably easier "in theory" to just adapt it to use Dev86DOS + NASM for the tricky bits. So it would just mean migrating away from the compact model stuff and do it directly in (external) assembly.

> Just a toy project-- a C-ish compiler, an assembler, a BASIC compiler,
> etc.
> The project could hypothetically run on an 8086, and provide an interesting
> setup for tinkering. I want compilers, though (and maybe also a BASIC
> interpreter).

So then I would probably use Dev86DOS, NASM 0.98.39 (real mode version), and XPL0 (since I can't think of any 16-bit BASIC "compilers" offhand, e.g. BWBasic is only an interpreter). But there are probably others if you search hard enough.


Complete thread:

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