! DECUSC.HLP   Created by Martin Minow, 25-Jul-80, edited 11-Feb-82
!
1 C
Decus C is a PDP-11 compiler for the C language.  It is distributed
by Decus and is otherwise unsupported.  It may be used under RSX11-M,
RSTS/E, RT11, and VAX/VMS (compatibility mode).  The language
is generally as described in Kernighan and Ritchie's book, The
C Programming Language (with several restrictions).  Type HELP CC for
information on the DEC VAX-11 native mode C compiler.
2 RSX
Usage (RSTS/E RSX mode, RSX-11M, and VMS compatibility mode):

        XCC file

Output from the compiler is a file in "Unix assembler format" which
is assembled as follows:

        XAS file -d

(On RSX-11M, "XCC -a file" will compile and assemble the source.)

The resulting .obj file is taskbuilt against the C library C:C.OLB:

        TKB
        TKB> file=file,c:c/lb
        TKB> /
        ENTER OPTIONS:
        TKB> stack = 1500
        TKB> //

The "stack" stack option may be needed if the program is recursive.

On VMS compatibility mode, the program is defined as a command
by the sequence:

        COMMAND :== $DISK:[ACCOUNT]FILE.EXE

This allows passing arguments to the program upon invocation.

2 RSTS/RT11
Usage (RSTS/E RT11 mode):

        CC file

Output from the compiler is a file in "Unix assembler format" which
is assembled as follows:

        AS file/d

The resulting .obj file is linked against the RT11 C library C:CLIB.OBJ:

        LINK file=file,C:SUPORT,C:CLIBN/B:2000  (no EIS)
        LINK file=file,C:SUPORT,C:CLIB/B:2000 (with EIS)

The start address must be increased over the default to allow space for
automatic variable allocation.  /B:2000 is a reasonable minimum value.

2 RT11
Usage (native RT11)

        RUN CC
        CC> file

Output from the compiler is a file in "Unix assembler format" which
is assembled as follows:

        RUN AS
        AS> file/d

The resulting .obj file is linked against the RT11 C library C:CLIB.OBJ:

        R LINK
        *file=file,C:SUPORT,C:CLIBN/B:2000  (no EIS)
        *file=file,C:SUPORT,C:CLIB/B:2000 (with EIS)

The start address must be increased over the default to allow space for
automatic variable allocation.  /B:2000 is a reasonable minimum value.
2 SWITCHES (for XCC)
Note the following switches:

RSX RT11
-a  /a  Chain to AS if no errors (RSX-11M native mode only)
        /a may not be given from an RT11 command file.
-d  /d  Double precision (normal) floating point
-f  /f  Single precision (non-standard) floating point
-p  /p  Include profile code generation

2 AS
Under RSX or its derivitives, the assembler is run by:

        XAS file.s -switches

Under RT11 or its derivitives, the assembler is run by:

        AS file/switches	(RSTS/E)

or
        RUN AS
        AS> file,list=file/switches

The assembler is controlled by the following switches:

RSX RT11
-b  /b  Flag branches that are expanded to Bxx/JMP sequences
-d  /d  Delete the input file if no errors were encountered
          (normal for C assemblies).
-g  /g  Globalize undefined symbols
-l  /l  Explicitly generate a listing file.  Under RT11 you
          can even write "AS file.obj,file.lst=file.s"
-n  /n  Do not generate an object file
2 INVOCATION
When C programs are run, a Unix-style startup sequence is emulated
(including redirection of standard input and output).  This requires
installing the program as a CCL (RSTS/E) or known-image (RSX-11M) or
foreign command (VAX/VMS).  On RSTS/E, C programs may be invoked by
using the CRUN CCL command:

  CRUN PROG -switches [<infile] [>outfile]

Note that lower-case arguments should be quoted to prevent translation
by the operating system.  CRUN uses a search list to locate the file,
first looking in your current directory, then in your private group
library, then in C:, then in PUB:, then in $.

On VMS compatibility mode, the program should be named by a command
of the format:

  COMMAND :== $DISK:[ACCOUNT]PROG.EXE

If a C program is RUN, it will prompt for an argument string:

  RUN PROG
  PROG> arguments

2 DOCUMENTATION
The following documentation is available:

	c:cc.doc	Compiler Usage
	c:as.doc	Assembler Usage
	c:clib.doc	Runtime library Usage
	c:cbugs.doc	Current list of problems
	c:wizard.doc	Runtime library with internal documentation (BIG!)
	c:tools.doc	Utility programs written in C
	c:cu.doc	Utility subroutine library
