On Tue, 2014-05-06 at 09:50 +0000, alan.b.pearce@stfc.ac.uk wrote: > > > Try implementing a C compiler completely onboard on of these > > > microcontrollers. I think that you'll find that some choices were mad= e > > > for good reason. > >=20 > > But the original C compiler wasn't developed to be run from the ROM spa= ce > > of an embedded MCU. It was developed on a mini which had fast backing > > store and was capable of swaping memory between backing store and RAM. >=20 > I thought the 'original' C compiler ran on a PDP8 with core memory.=20 I was surprised that C was developed on the 11. At the time the PDP-8 was far more prevasive. I suppose the idea was to use the latest and greatest machine. > I remember a government department I worked for having a PDP11/34 with 8k= core and dual 8" floppies. Later on they bought a PDP11/08 with 16k RAM as= a software cross development machine, and managed to splash out on a hard = disk for it. One of my colleagues made a floppy controller for around a CO= SMAC micro, and generic PDP interface card and a Shugart floppy disk contro= ller and disk drives. It had about 3-4x the speed of the DEC controller, an= d was considerably cheaper than the equivalent DEC hardware. >=20 > I wouldn't be surprised if the original C developers had similar limited = memory at their disposal, and hence were into short cuts to minimise progra= m size, without any memory swapping. I would be amazed if they had more than 32K. If I recall, early PDP-11's couldn't use more than 16 or 32K. And I think it was an 11/34 that was used to develop the compiler. That was *THE* machine for a very long time. I was late to the DEC game, switching over at the 11/44 time frame. I don't know if the younger folks know this, but at the time "core" memory consisted of tiny ferrite donuts with wires running through them. These wires were actually strung by hand, making core quite expensive. The PDP-11 had "3D core", so a wire passed through each core for each axis. 8K of core required 138,264 tiny ferrite donuts, each having three wires through it (one bit for parity - this was before ECC memory). Each wire threaded by hand. Even back then that labor-intensive task was outsourced to the far east. --McD > Another colleague had a story of squeezing a copy of the COSMAC cross ass= embler, written in FORTRAN, into a PDP11 system with dual floppies and very= limited memory. He managed to get the thing to work by having many program= overlays. Apparently it would read a character from the source file, overl= ay the program to decide if it got to the end of line, overlay the program = to read the next character and so on until the end of line, then get the ne= xt overlay to start to process the line - a process which went through a nu= mber of overlays depending what the source line instruction was, then go th= rough another series of overlays to write the line out to the list file a c= haracter at a time. Those were the days of RAM limited programs ... >=20 > --=20 > Scanned by iCritical. >=20 --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .