DMDCC(1)

NAME
dmdcc - 630 MTG C compiler

SYNOPSIS
dmdcc [ options ] file ...

DESCRIPTION
The dmdcc command is the 630 MTG C compiler. Any software to be downloaded into the 630 MTG must be compiled using this command.

Dmdcc works in a similar manner to other compiler (cc) commands but is enhanced to call mc68cpp and mc68ld with special arguments for the 630 MTG development environment. In particular, the dmdcc command defines the variable DMD630, it sets the include search path to $DMD/include, it sets the library search path to $DMD/lib, it includes the standard 630 MTG libraries, it links in the 630 MTG C run-time start-up routine crtm.o, and it tells mc68ld to retain relocation information so the resulting executable file can be relocated before download into the 630 MTG.

The exact arguments passed to mc68cpp and mc68ld can be viewed by including the -# debugging argument on the dmdcc command line.

The dmdcc utility accepts three types of arguments:
    .c
    .s
    .o

Arguments whose names end with .c are the C source programs, and those with .s are the assembly programs. They are compiled/assembled, and each object program whose name is that of the source with .o substituted for .c or .s is left in the file. The .o file is normally deleted if a single C program is compiled and link-edited all at one time.

The following flags are interpreted by dmdcc . See mc68cpp(1), mc68as(1) and mc68ld(1) for other useful flags.

-c  Suppress the link-editing phase of the compilation, and force an object file to be produced even if only one program is compiled.

-g  Flag to the compiler to produce additional information needed for the use of dmdpi(1).

-O  Invoke an object-code optimizer. The optimizer will move, merge, and delete code; this option should not be used if it is expected that compiled code may be debugged with dmdpi(1).

-Wc,arg1[,arg2...]
    Hand off the argument[s] to pass c where c is one of [p02al] indicating preprocessor, compiler, optimizer, assembler, or link editor, respectively. For example:
    -Wa,-m
    invokes the m4 macro preprocessor on the input to the assembler.

-S  Compile the named C programs, and leave the assembler-language output on corresponding files suffixed .s.

-P  Run only the macro preprocessor on the named C programs, and leave the output on corresponding files suffixed .i.

-E  Same as the -P option except the output is directed to the standard output. This allows the preprocessor to be used as a filter for any other compiler.

-#  Debug flag. Show the command lines passed to mc68cpp, mc68ccom, mc68as and mc68ld.

-x  Turn off special processing for the 630 MTG environment. This argument should not be used when compiling programs to be downloaded into the 630 MTG.

-Z n
    Allocate n bytes of stack for process. If not specified the default is 2048, Note that stack size can be overridden at download time with the dmdld -Z option. If n is specified smaller than 2048, it is defaulted to 2048.

Other arguments are taken to be either C preprocessor or link-editor flag arguments, or C-compatible object programs, typically produced by an earlier dmdcc run, or perhaps libraries of C-compatible routines. These programs, together with the results of any compilations specified, are link-edited (in the order given) to produce an executable program with name dmda.out unless the -o option of the link-editor is used.

The dmdcc command expects the DMD shell variable to be set and exported in the user's environment. This variable must point to the "root" directory of the 630 MTG software node.

Dmdcc tags the downloadable ouput file with a programming envirionment identification number (PEID) which is used by dmdld prior to download to verify copatibility with terminal firmware. The PEID is determined by dmdcc from the firmware routine linkages included in the process. Every firmware routine called by the process causes a linkage to the routine to be retrieved from archive and included in the load module. Each of these linkage routines is tagged with a PEID related to the firmware version that supports the called firmware routine. The PEID associated with the latest level of firmware required to support those linkages retrieved from archive is tagged to the load module. Compatibility with earlier firmware releases is maintained as long as new firmware functions not supported by older firmware are not used in the program.

FILES
file.c
    input file
file.o
    object file
file.s
    assembly language file
dmda.out
    link-edited output
/usr/tmp/mc68?
    temporary file
$DMD/lib/mc68cpp
    preprocessor
$DMD/lib/mc68ccom
    compiler
$DMD/lib/mc68optim
    optimizer
$DMD/bin/mc68as
    assembler
$DMD/bin/mc68ld
    link loader

SEE ALSO
dmdpi(1), mc68as(1), mc68cpp(1), mc68ld(1).
m4(1) in the UNIX System V Programmer's Reference Manual.

The C Programming Language, by Kernighan, B. W., and Ritchie, D. M., Prentice-Hall, 1978.
Programming in C-A Tutorial by Kernighan, B. W.
C Reference Manual by Ritchie, D. M.

DIAGNOSTICS
The diagnostics produced by the C compiler are sometimes cryptic. Occasional messages may be produced by the assembler or link-editor.