[comp.sys.m6809] os9 C compiler and Disk cache request

csantiag@potpourri.UUCP (Carlos Santiago) (09/02/87)

 Can someone please explain pipe the different parts of the C compiler
together? I am running Level II on a CoCo 3 with 512k and 2 40 track double
sided drives. I tried to pipe the files together, but the c.asm module had
problems finding the assembly source.

   I would also like to know if anyone has a public domain program for
disk caching that they could post on the net?.

-- 
                  Gould, CSD, Home of the Firebreathers 
                    The opinions expressed are my own.
                   ...siesmo!gould!csantiago
                   ...mcnc!rti-sel!gould!potpourri!csantiag

harmon@abvax.icd.ab.com (Larry Harmon) (09/03/87)

In article <596@potpourri.UUCP>, csantiag@potpourri.UUCP (Carlos Santiago) writes:
> 
>  Can someone please explain pipe the different parts of the C compiler
> together? I am running Level II on a CoCo 3 with 512k and 2 40 track double
> sided drives. I tried to pipe the files together, but the c.asm module had
> problems finding the assembly source.
> 
	Well I'm afraid you just can't pipe the assemble or link steps of the
C compiler.  My approach has been to pipe the preprocessor, pass1, and pass2
steps leaving the output in a temporary file with the same name cc1 would have
given it, then finish the compile (asm and link) exactly the same way cc1 would.
	It would be great to be able to pipe the whole process but, even piping
the first half at least doubles the speed of the process.  If the C passes are
all resident in memory and pipes are used a three to four times speed increase
is achieved.  I would be interested to know how using a ram disk such as the
external DISTRO would affect the speed.  Anyone doing this?
							Larry Harmon

knudsen@ihwpt.ATT.COM (mike knudsen) (09/03/87)

Unlike the rest of the c.xxx modules, c.asm is not designed
to take standard input*, so you can't include it in the pipeline,
which now has to end with the optimizer:

C.PREP yourfile.c ! C.PASS1 ! C.PASS2 ! C.OPT >yourfile.o
C.ASM yourfile.o -o=yourfile.r

and whatever you want to do next (link).
Writing that .o file does slow down your disk;
you can speed up a little by putting it on another drive,
or best of all, a ramdisk.

Second your motion for a caching disk driver.
The caching driver that was discussed at length is for
SDOS, not OS9, unforchly.

*Possibly because c.asm has to read the input file twice (?)

PS: When my Sardis controller comes (already overdue),
I'll be able to compile one C program while editing the next!
-- 
Mike J Knudsen    ...ihnp4!ihwpt!knudsen  Bell Labs(AT&T)
    Delphi: RAGTIMER    CIS: <memory failure, too many digits>
		"Just say NO to MS-DOS!"

rms@frog.UUCP (Bob Santy) (09/05/87)

In article <596@potpourri.UUCP>, csantiag@potpourri.UUCP (Carlos Santiago) writes:
> 
>  Can someone please explain pipe the different parts of the C compiler
> together? I am running Level II on a CoCo 3 with 512k and 2 40 track double
> sided drives. I tried to pipe the files together, but the c.asm module had
> problems finding the assembly source.
> 

The c.asm is an assembler that makes two passes over the source.  This can't
be done when the information it is reading is coming from a pipe which, on
OS9 at least, technically is not a file that can be "rewound".  You can use
the method you describe, but place the output of the optimizer in a tempora
temporary file and run it as usual.  All other phases can use pipes.

rsanders@watdcsu.UUCP (09/08/87)

In article <51@abvax.icd.ab.com> harmon@abvax.icd.ab.com (Larry Harmon) writes:
>In article <596@potpourri.UUCP>, csantiag@potpourri.UUCP (Carlos Santiago) writes:
>> 
>>  Can someone please explain pipe the different parts of the C compiler
>> together? I am running Level II on a CoCo 3 with 512k and 2 40 track double

>is achieved.  I would be interested to know how using a ram disk such as the
>external DISTRO would affect the speed.  Anyone doing this?

Yes see below.... (I tryed to mail this the other day but it didnt make it)

I tryed this the other night and had the same problem. I have loaned out
my manual for the C compiler so I couldnt look up the command line params
for the various parts. I ended up piping c.prep c.pass1 p.pass2 c.opt together
to make a temp file. I then did the asm and link with temp files the same 
as c.com does. I have a Disto Ram disk and I was using that for all file
accesses. Turns out that for a simple program (hello, world) it took
30 seconds to compile with pipes and 32 with tempfiles on ramdisk.
I have decided not to fuss with the pipe version as it is not worth the
effort. If you are using temps on floppy however it might be worth it.
There was some code in the newsgroup a while back to make a Ram disk out
of some of the high order memory. Might be worth trying.

   Good Luck!

-- 
  Roger Sanderson: {clyde|decvax|ihnp4}-\
  VE3RKS                     {tektronix}-+--> watmath!watdcsu!rsanders
                     {ubc-vision|utzoo}-/