[Coco] Converting ANSI-C to K&R(Microware) - Ansifront didn't work
gene heskett
gheskett at wdtv.com
Sun Jan 9 19:46:56 EST 2011
On Sunday, January 09, 2011 07:39:35 pm Michael Furman did opine:
> 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 */
>
Sounds like a likely place to specify that stuff. Unforch, after nearly 20
years since I last 'adjusted' it, memories of how I did it get fuzzy with
age. Somewhat like me I guess. ;-)
> >> 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);
It shouldn't be too hard to add that stanza, complete with a controlling
switch, either a cli option or a header edit & rebuild.
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
The shortest distance between any two puns is a straight line.
More information about the Coco
mailing list