Old 8086 version of pcc spotted (cross-compiles to DOS) (Miscellaneous)
> One of the unstated rules:
> If it can't compile itself and is written in the language it implements,
> it's not good enough...
I don't like the difficulties in compilers that aren't able to (portably) bootstrap. It seems so senseless to me. In a way, I almost prefer interpreters or things that compile in ANSI C because it's so much simpler and portable. But the king of simple bootstrapping is Forth, so maybe I'm looking in the wrong place. It just bugs me that Wirth-family compilers are so hard to build (which is ironic considering how much Wirth himself keeps things simple, but nobody seems to take his advice ... reminds me that I need to study closer Oberon-0 or P4 or Pascal_s sometime).
> This pretty much kills dev86, since BCC-CC1.EXE is 120+ k. :(
While you're probably right, code size isn't always equivalent between compilers. So I don't think it's totally impossible that BCC could one day compile itself. Though it probably won't, it's mostly meant for cross-compiling from *nix. Most C libraries are notoriously bloated.
> DeSmet 3.03 will bootstrap itself, and runs small enough to fit on a floppy
> with some room free (600 k for the standard compiler, 450 k for the large
> one).
> There's a bit of old code written for DeSmet, since it was the main
> shareware compiler (PCC).
> I may poke and see if nasm 0.9x can build with this, so I have a full
> bootstrap environment.
I would be very very surprised if you could get NASM built with it. Actually, a fair number of assemblers are written in themselves (e.g. Octasm, FASM), so it'd be easier just to use one of those, though I admit those aren't 8086 friendly. (But check out Venksi's very tiny 8086 one here.)
Old NASM was indeed pure ANSI C89, though, so I guess it's possible, but Desmet doesn't have full ANSI libs / headers.
> DeSmet may be weird, but it still beats a K&R-ish small model compiler that
> supports DOS as an afterthought and can use unprotoize if you really need
> to try building ANSI. Allegedly, 3.1h supported ANSI C natively - I
> haven't verified this.
I haven't heavily used Desmet, but 3.1h does seem pretty good. Granted, I didn't test too much with it, and as mentioned I had to nop out any mention of stdlib.h and time.h, so you're going to be lacking things. But the syntax part and code generation seems to work (in at least one very unofficial test). Yes, it's surprisingly capable, but I wouldn't pin too high hopes on it (though it does support both small and, optionally, large model too).
> For BASIC, I'm looking at http://exmortis.narod.ru/src_compilers_eng.html
> (they have a near-QBASIC compatible compiler that outputs NASM code, and a
> GABASIC knockoff with IDE, written in GABASIC)
I'd be surprised if those were much use. Similarly it reminds me of old BASM286, but I don't think that's quite robust enough for you, but hey, it ain't too too bad, last I checked.
BTW, I know you want a real compiler, not an interpreter, but I must mention this: EiC (Detlef's port) is probably best for interpreting (and seems very very ANSI compatible). The advantage is, of course, that you don't need assembler, linker, libraries, hence no worries about calling conventions, object formats, etc. Of course, that will be slightly slower and makes it harder to share code. But for quick prototyping or simple demos, it's plenty good.
I really also wanted to mention PicoC. With DJGPP 2.03p2 and UPX, the NO_FP version is only 78k for me (with my silly patch to fix a few minor nits). Granted, it has some omissions, so it's not fully ANSI compatible, esp. the lack of (almost entire) CPP preprocessor capabilities. But if you workaround that (easy, use pre-existing external CPP.EXE), it works quite well and is small and self-contained, even slightly moreso than EiC even. So I find it interesting.
Complete thread:
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Ibidem, 08.01.2012, 03:54 (Miscellaneous)
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 01.03.2012, 01:01
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 01.03.2012, 06:58
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 01.03.2012, 07:26
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 01.03.2012, 21:33
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 01.03.2012, 21:48
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 03.03.2012, 23:43
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 04.03.2012, 03:34
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 05.03.2012, 20:14
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 05.03.2012, 20:56
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 06.03.2012, 03:51
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 06.03.2012, 04:14
- LCC-DOS.ZIP 4.2 using DJGPP libc 2.01 (28-Aug-2011) - Rugxulo, 07.03.2012, 01:38
- LCC-DOS.ZIP 4.2 using DJGPP libc 2.01 (28-Aug-2011) - bocke, 10.03.2012, 08:29
- LCC-DOS.ZIP 4.2 using DJGPP libc 2.01 (28-Aug-2011) - Rugxulo, 10.03.2012, 18:51
- LCC-DOS.ZIP 4.2 using DJGPP libc 2.01 (28-Aug-2011) - bocke, 19.03.2012, 02:17
- LCC-DOS.ZIP 4.2 using DJGPP libc 2.01 (28-Aug-2011) - Rugxulo, 19.03.2012, 19:00
- LCC-DOS.ZIP 4.2 using DJGPP libc 2.01 (28-Aug-2011) - bocke, 19.03.2012, 02:17
- LCC-DOS.ZIP 4.2 using DJGPP libc 2.01 (28-Aug-2011) - Rugxulo, 10.03.2012, 18:51
- LCC-DOS.ZIP 4.2 using DJGPP libc 2.01 (28-Aug-2011) - bocke, 10.03.2012, 08:29
- LCC-DOS.ZIP 4.2 using DJGPP libc 2.01 (28-Aug-2011) - Rugxulo, 07.03.2012, 01:38
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 06.03.2012, 06:26
- Old 8086 version of pcc spotted (cross-compiles to DOS) - roytam, 06.03.2012, 12:36
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 10.03.2012, 08:17
- Old 8086 version of pcc spotted (cross-compiles to DOS) - roytam, 06.03.2012, 12:36
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 06.03.2012, 04:14
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 06.03.2012, 03:51
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 05.03.2012, 20:56
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 05.03.2012, 20:14
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 04.03.2012, 03:34
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 03.03.2012, 23:43
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Ibidem, 22.03.2012, 00:58
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 22.03.2012, 08:38
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Ibidem, 22.03.2012, 18:17
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 22.03.2012, 20:34
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Ibidem, 23.03.2012, 07:06
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 27.03.2012, 20:28
- Old 8086 version/Venksi's self-assembling assembler+runcom - Arjay, 27.03.2012, 21:35
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 27.03.2012, 20:28
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Ibidem, 23.03.2012, 07:06
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 22.03.2012, 20:34
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Ibidem, 22.03.2012, 18:17
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 22.03.2012, 08:38
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 01.03.2012, 21:48
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 01.03.2012, 21:33
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 01.03.2012, 19:23
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 01.03.2012, 21:36
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 01.03.2012, 07:26
- Old 8086 version of pcc spotted (cross-compiles to DOS) - Rugxulo, 01.03.2012, 06:58
- Old 8086 version of pcc spotted (cross-compiles to DOS) - bocke, 01.03.2012, 01:01