[net.decus] DECUS C Questions

tro@adiron.UUCP (Tom Olin) (11/12/85)

I am attempting to use the DECUS C compiler on RT-11 V4.  The
compile-time environment that I have consists of CC.SAV, AS.SAV, and
CLIB.OBJ.  Other than a few source files (GREP.C, ECHO.C, etc.), that's
it.  No documentation of any sort.

When I run CC, I can get it's usage line, but when I attempt to compile
anything, I get the message "?MON-F-No dev[ice] nnnnnn", where the nnnnnn
varies, depending on exactly how I enter the command line.  The devices
I have on my system are DY0 (SY), DY1 (DK), LS (LP), NL, and TT.

Questions:

	(1) Exactly what is CC complaining about?  What must I do to
	get it to work?

	(2) What is the meaning of the various command line switches?

	(3) If I can get CC working, I assume I run its output through
	AS.  Am I correct?  Is there anything else I should know about
	the compiler, such as special LINK options?

If anybody has some documentation which will answer these questions, I
would like to make arrangements to receive it.

Please send responses to ...duke!adiron!tro.

rdp@teddy.UUCP (11/15/85)

In article <296@adiron.UUCP> tro@adiron.UUCP (Tom Olin) writes:
>I am attempting to use the DECUS C compiler on RT-11 V4.  The
>compile-time environment that I have consists of CC.SAV, AS.SAV, and
>CLIB.OBJ.  Other than a few source files (GREP.C, ECHO.C, etc.), that's
>it.  No documentation of any sort.
>
>When I run CC, I can get it's usage line, but when I attempt to compile
>anything, I get the message "?MON-F-No dev[ice] nnnnnn", where the nnnnnn
>varies, depending on exactly how I enter the command line.  The devices
>I have on my system are DY0 (SY), DY1 (DK), LS (LP), NL, and TT.
>
>Questions:
>
>	(1) Exactly what is CC complaining about?  What must I do to
>	get it to work?
>
i
CC isn't complaining, as such. RMON is. There is, in fact, a bug in the
CC compiler that occurs when you try to use the compiler with the
pre-processing phase turned off. I have encountered the problem also
and have spoken to Martin Minnow about (the guy who wrote it). If you
attempt to use the compiler with the /m switch, this problem will
occur. I have found the following command line nearly always works,
though:

	.R CC
	CC> file

Replace, of course, 'file' with the filename of the source your compiling.
Occasionaly (especially on large sources/small disks) you will run into
the problem of space allocation for the intermediate files. This may
require you to specifically allocate the space for these files:

	.R CC
	CC> file.s,file.tmp[nnn],file.tm1[nnn]=file

"nnn" has to be played with, but often something about 5 times the source
file works. 


>	(2) What is the meaning of the various command line switches?
>

	/a - chain to AS upon completing the compile
	/d - pass all single precision floats to functions as double precision
	/e - generate in-line code for multiply, divide, xor for EIS
	     machines
	/f - pass all single precision lfoats as single precision
	/l - write internal code tress as comments to .S file
	/m - disable macro pre-processor (broken)
	/n - generate calls for multiply, divide, xor, etc.
	/p - add profiling code
	/r - define symbol "rsts"
	/w - supress "variable defined but unused" compiler warnings

There are others, but are used for debugging the compiler. Don't use them.

>	(3) If I can get CC working, I assume I run its output through
>	AS.  Am I correct?  Is there anything else I should know about
>	the compiler, such as special LINK options?
>

There is one other file needed, that is SUPORT.OBJ. When you link, your
command should look like:

	.LINK/BOTTOM:2000 file,C:CLIB,C:SUPORT

the /BOTTOM switch allocates sufficient stack space for the runnable
image. If you need more, than increase the value.


>If anybody has some documentation which will answer these questions, I
>would like to make arrangements to receive it.
>

For anyone who has this dilemna, reply to me and I will get you a copy
(via floppy).


>Please send responses to ...duke!adiron!tro.

andys@houxa.UUCP (A.SHERMAN) (11/18/85)

<<bit-brains of the world unite!>>

Someone else has already responded quite cogently to this article.  However,
a few more points are in order:
	1) Is it possible for the compiler to complain about the lack of a
	device C: if there are any #include <...> statements in the source?
	I no longer run on a DECUS-C system so I can't check it out.

	2) A complete distribution on magtape, including all sources and
	documentation in both runoff and printable format, is available from
	the DECUS library.  The order number used to be 11-SP-18, but check it
	out.  If you need a lesser distribution, check the catalog, for the
	various binary distributions on other media.

 					Andy Sherman @ AT&T Bell Laboratories
					uucp: ..!houxa!andys
					DDD: (201) 949-4671
					usps: Room 3B-437A
					      Crawfords Corner Road
					      Holmdel NJ  07733-1988

The views and opinions, etc...

cdl@mplvax.UUCP (Carl Lowenstein) (12/05/85)

In article <296@adiron.UUCP> tro@adiron.UUCP (Tom Olin) writes:
>I am attempting to use the DECUS C compiler on RT-11 V4.  The
>compile-time environment that I have consists of CC.SAV, AS.SAV, and
>CLIB.OBJ.  Other than a few source files (GREP.C, ECHO.C, etc.), that's
>it.  No documentation of any sort.
>
>When I run CC, I can get it's usage line, but when I attempt to compile
>anything, I get the message "?MON-F-No dev[ice] nnnnnn", where the nnnnnn
>varies, depending on exactly how I enter the command line.  
>	(1) Exactly what is CC complaining about?  What must I do to
>	get it to work?
>
Most likely, the lack of a device logically named 'C'.  ASSIGN SY: C:
will take care of that.  Of course, probably it is looking for
C:STDIO.H as an #include file when it dies.
>	(3) If I can get CC working, I assume I run its output through
>	AS.  Am I correct? 
RU C:CC file.c/A	! will chain from CC to AS automatically and delete
			! the intermediate file.S
Is there anything else I should know about
>	the compiler, such as special LINK options?
>
LINK file,C:(SUPORT,CLIB)/bottom:2000	! will take care of most cases.
		! C programs use lots of stack space in general

>If anybody has some documentation which will answer these questions, I
>would like to make arrangements to receive it.
>
Documentation is available from the DECUS library, and amounts to several
hundred pages.  Either hard copy or RUNOFF source form.  If you have trouble
getting it, ask me for more help.  I suppose a self-addressed stamped
magtape could be dealt with, but the library is the best place to go.


-- 
	carl lowenstein		marine physical lab	u.c. san diego
	{ihnp4|decvax|akgua|dcdwest|ucbvax}	!sdcsvax!mplvax!cdl