File:  [CSRG BSD Unix] / 43BSDReno / share / doc / ucs / sumacc / cc68.1
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:57 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

.TH CC68 1 MC68000
.SU
.SH NAME
cc68 \- C compiler for the MC68000
.SH SYNOPSIS
.B cc68
[ option ] ... file ...
.SH DESCRIPTION
.I Cc68
is the UNIX C compiler modified for the MC68000.
.I Cc68
is a flexible program for translating between various types of files.  The
types catered for in order of appearance during translation are `.c' (C source
files), `.s' (assembly language files), `.b' (relocatable binary files),
`b.out' (absolute binary files), `.r' (byte-reversed files, cf.
.I rev68(1)
).
and `.dl' (Macsbug download format, cf.
.I dl68(1)
).
.PP
Arguments to cc68 are either flags or input files.
The type of an input file is normally determined by its suffix.  When an
argument to cc68 is not a flag and has a suffix different from any
of the above suffixes, it is
assumed to be of one of the types `.c', `.b', or `b.out', namely the latest of
these three consistent with the type of the output (e.g. if the output type
were `.s' or `.b' then the input would have to be `.c').  If it has no
suffix it is assumed to be of type `b.out'.
.PP
Translation proceeds as follows.  Each
`.c' and `.s' program is translated to a `.b' relocatable using cpp, ccom68,
and as68 as necessary.  Then all .b files including those produced by
translation are link edited into the one file, called `b.out'.  If the only
input file was a single `.c' program then the `.b' file is deleted, otherwise
all `.b' files are preserved.
.PP
The amount of processing performed by cc68 may be decreased or increased with
some of the options.  The -S option takes translation no further than `.s'
files, i.e. only cpp and ccom68 are applied.  The -c option takes translation
up to `.b' files, omitting the link editing and not deleting any `.b' files.
The -d option goes beyond `b.out' to produce a `.dl' file (using dl68) that
may be downloaded by the Motorola MACSBUG monitor and the Sun1 monitor.  The
-r option similarly goes beyond `b.out' to produce a `.r' file (using rev68)
that may be loaded directly by 68000 code based on ld68.  Both -d and -r may
be used together.
.PP
The output may be named explicitly with the -o option; the output file's name
should follow -o.  Otherwise the name is `b.out' in the normal case, or
`filename.dl' for the -d option, or `filename.r' for the -r option, where
`filename' is the first `.c', `.s', or `.b' file named as an input.  If the
input is not in any of those three categories, the names `d.out' and `r.out'
are used respectively for -d and -r.
.PP
The version of the target machine may be given as the flag
.BI \-v n
where 
.I n
is the version.  The only recognized version at present is -vm, "Version
Macsbug."  The effect of giving the -vm flag is to add /usr/sun/dm/include to
the include directories for cpp, to add /usr/sun/dm/lib as a library in which
to look for -lx libraries, and to load the symbol table if any into the region
starting at 0x6BA.
.PP
The file /usr/sun/lib/crt0.b is passed to ld68, ahead of all other .b files.
This has the effect of defining the symbol _start to be at the text origin and
having a routine that performs necessary initialization, enters main, and
exits cleanly to the monitor.
.PP
The following options are interpreted by
.IR cc .
See
.IR ld68 (1)
for load-time options.
.TP 8
.B \-d
Produce a .dl file suitable for downloading with the MACSBUG monitor of the
Motorola Design Module, cf.
.IR dl68 (1).
.TP
.B \-r
Produce a .r file suitable for direct loading by the 68000, cf.
.IR rev68 (1).
.TP
.B \-c
Suppress the loading phase of the compilation, and force
an object file to be produced even if only one program is compiled.
.TP
.B \-w
Suppress warning diagnostics. \fb[Note: may not work.]\fr
.TP
.SM
.B \-O
Invoke an
object-code improver.
.TP
.SM
.B \-S
Compile the named C programs, and leave the
assembler-language output on corresponding files suffixed `.s'.
.TP
.SM
.B \-E
Run only the macro preprocessor
on the named C programs, and send the result to the
standard output.
.TP
.B \-L
Produce an assembly listing for each source file, with the
suffixes changed to ``.ls''.
.TP
.B \-R
Preserve relocation commands in b.out.
.TP
.SM
.B \-C
prevent the macro preprocessor from eliding comments.
.TP
.SM
.B \-V
Link for a V kernel environment.
This is equivalent to specifying 
.BI \-i/usr/sun/lib/teamroot.b
.B \-T 10000
and 
.B \-lV
at the end.
.TP
.SM
.B \-m
Link for a Macintosh environment.
This is equivalent to specifying 
.BI \-i/usr/sun/lib/crtmac.b
.B \-T 0
.B \-e _start
.B \-r
.B \-d
and 
.B \-lmac
.B \-lc
at the end.
.BI 
.TP
.BI \-o " output"
Name the final output file
.IR output .
If this option is used and the file `b.out' already exists it will be left
undisturbed.
.TP
.BI \-l x
Include libx.a as a library ld68 should search in for undefined functions.
.B x
may be more than one letter, as in -lpup.
.TP
.BI \-T " org"
Org specifies in hexadecimal where to begin loading the program.
.TP
.BI \-e " entrypoint"
Entrypoint specifies where to begin execution.
.TP
.SM
.BI \-D name=def
.br
.ns
.TP
.SM
.BI \-D \*Sname
Define the
.I name
to the preprocessor,
as if by
`#define'.
If no definition is given, the name is defined as "1".
.TP
.SM
.BI \-U \*Sname
Remove any initial definition of
.IR name .
.TP
.SM
.BI \-I \*Sdir
`#include' files
whose names do not begin with `/' are always
sought first in the directory 
of the
.I file
argument,
then in directories named in 
.B \-I
options,
then in directories on a standard list. The standard list
is (in order of search)
.I /usr/sun/include
and
.IR /usr/include .
.TP
.SM
.BI \-B \*Sstring
Find substitute compiler passes in the files named
.I string
with the suffixes cpp, ccom and c2.
If 
.I string 
is empty, use a standard backup version. \fb[Which doesn't work!]\fr
.TP
.BR \-t [ p012 ]
Find only the designated compiler passes in the
files whose names are constructed by a
.B \-B
option.
In the absence of a
.B \-B 
option, the
.I string
is taken to be `/usr/c/'.
.TP
.B \-\-x
By default,
.I cc68
passes a
.B \-x
flag to
.IR ld68 ,
in order to suppress local symbols from the final symbol table.  The
.B \-\-x
flag inhibits this default.
.PP
Other arguments
are taken
to be either loader option arguments, or C-compatible
object programs, typically produced by an earlier
.I cc68
run,
or perhaps libraries of C-compatible routines.
These programs, together with the results of any
compilations specified, are loaded (in the order
given) to produce an executable program with name
.B b.out.
.SH FILES
.ta \w'/usr/sun/lib/libc.a  'u
file.c	input file
.br
file.b	object file
.br
b.out	loaded output
.br
/tmp/ctm?	temporary
.br
/lib/cpp	preprocessor
.br
/usr/sun/c68/comp	compiler
.br
/usr/sun/c68/o68	optional optimizer
.br
/usr/sun/lib/crt0.b	runtime startoff
.br
/usr/sun/lib/libc.a	standard library, see (3)
.br
/usr/sun/include
.br
/usr/include	standard directories for `#include' files
.SH "SEE ALSO"
B. W. Kernighan and D. M. Ritchie,
.I The C Programming Language,
Prentice-Hall,
1978
.br
B. W. Kernighan,
.I
Programming in C\(ema tutorial
.br
D. M. Ritchie,
.I
C Reference Manual
.br
ld68(1)
.SH DIAGNOSTICS
The diagnostics produced by C itself are intended to be
self-explanatory.
Occasional messages may be produced by the assembler
or loader.
.SH BUGS
This is hacked up from
.IR cc (1),
and probably could be improved.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.