[Coco] Converting ANSI-C to K&R(Microware) - Ansifront didn't work

Michael Furman n6il at ocs.net
Sun Jan 9 16:31:09 EST 2011


On Jan 8, 2011, at 10:19 PM, gene heskett wrote:

> On Sunday, January 09, 2011 12:40:35 am Michael Furman did opine:
> 
>> I've noted that cc252 calls c.pass1 and c.pass2.  Is there any real
>> difference between this and c.comp?  How do I switch them?
> 
> There is not a functional difference between them other than the slightly 
> smaller memory footprint for the two piece version, they will both generate 
> identical code whose crc's match. c.comp I assume, will only run on a 
> coco3, I never tried it on a coco2 but would presume it would throw out of 
> memory errors on a level 1 system.
> 
> As for switching them, you might have to rebuild cc252 after editing the 
> call to c.pass1 to use c.comp, and to comment out the verse that calls 
> c.pass2.  And of course adjust the temp filenames to fit.
> 

First: Gene, Thanks so much for the detailed notes.

I peeked the source of c252.   These things can be changed in cc.h:

#define  TWOPASS     TRUE    /* undefine for one pass compiler */
#define  ASSEMBLER   "rma"     /* change to "c.asm" if NOT Developer's Pak */
#define  NASSEMBLER  "r63"      /* alternate assembler for native .a source */
#define  LINKER      "rlink"   /* change to "c.link" if NOT Developer's pak */

>> 
>> 
>> c.prep [ used by cc1 ]
>> c_prep19 [ Can replace c.prep ?, cc252 expects this to be named c_prep ]
> 
> Rename c.prep to c.prep-old, then copy c_prep19 to /dd/cmds/c.prep, should 
> work.  If not, fix the internel name with ded too, and don't forget to 
> (v)erify the fixed name with ded.  However, I ran it for yonks with the 
> internal name of c_prep, see this:
> ...
> One could fix the _ to be a . with ded.  However it's a shrug as long as 
> the called name matches.

Looks like there's no need for any of this, and it looks like you changed this code around 1993:

     19 **  11-22-93  Added -E opt, triggers c_prep18's trigraph expands. G. Heskett

    369                if(tgfex)
    370                         runit("c_prep -T ", 1);
    371                else
    372                         runit("c_prep", 1);

>> 
>> c.opt [ used by cc1, cc252 ]
>> copt2 [ can replace c.opt ? ]
> 
> No, it should follow c.opt, they do slightly different functions.

This appears to be hard coded as well:

    524                          runit("c.opt", 0);




More information about the Coco mailing list