make and friends was Re: [Coco] CCASM for Linux

KnudsenMJ at aol.com KnudsenMJ at aol.com
Tue Dec 14 01:04:33 EST 2004


In a message dated 12/13/04 9:53:44 PM Eastern Standard Time,  
goosey at virgo.sdc.org writes:

Yeah, cpp is a good tool.  And one that tends to get "integrated"  so
you can't do anything but C programs with it. :-( AFAIK the OS-9  C
compiler is about the only C compiler for 8-bit (or early  16-bit
micros) that has a separate preprocessor.


But most any "integrated" C compiler has command line flags to run just  the 
preprocessor, and give you the macro-expanded output.  For debugging  your 
macros, and also for debugging the macro expander (as we 6809 veterans know  only 
too well :-)  But ISTR stories of folks using CCP to work on  documents, etc.


A lot of the assembly in the linux kernel uses the C  preprocessor,
instead of relying on the assembler's own macro system (Does  GAS even
have complex macros?)
 

For sure, I recall that in the Bell Labs UNIX days, the PDP-11  assembler was 
very crude and bare bones.  All the macro smashing was done  with CCP.



I have to admit, though, for non-programming purposes, m4 is a  little
more friendly.  If nothing else, it doesn't insert #line lines  into
its output.



Well, m4 is "after my time."   Wasn't till after I left Bell Labs  that I 
found all those C++ features had been backhauled into "ANSI" C.   --Mike K.
 



More information about the Coco mailing list