COHERENT manpages
This page displays the COHERENT manpage for Programming COHERENT [Overview].
List of available manpages
Index
Programming COHERENT -- Overview
The C language is the ``native language'' of COHERENT. Most COHERENT
programs are written in C.
If you are a beginner and are interested in learning something about C,
look at the tutorial The C Language in the first part of this manual.
The following Lexicon entries give you information you need to write or
port C programs under COHERENT:
C keywords
This lists the C keywords recognized by the COHERENT implementation of
C. Each keyword, in turn, is described in full in its own Lexicon
entry.
C language
This summarizes the COHERENT implementation of C. It gives the size
of each data type, formatting of floating-point data, static limits,
and other information.
C preprocessor
This describes the processing directives that the COHERENT
preprocessor recognizes. Each directive is described in full in its
own Lexicon entry
header files
This entry names the header files included as part of COHERENT. Each
header file is described in its own Lexicon entry. Some of the
header-file articles are of particular interest.
libraries
This describes the libraries included with COHERENT. Almost every
library function and system call has its own Lexicon entry; the only
exceptions are the routines kept in libmisc.a and libcurses.a. Each
library has its own summary entry; of particular interest are the
entries libc, libm, libgdbm, and libsocket.
If you are an experienced C programmer who is new to COHERENT, we suggest
you look first at the article for C language, to get an overview of the
dialect of C that COHERENT supports. Look at the entry for libraries, to
see what libraries are available; then look at the entry for each library
to see what functions are available.
The following Lexicon entries describe the commands with which you can
compile and manage your programs:
ar The archiver. This turns a group of object modules into a library.
as The COHERENT macro-assembler. This assembles modules written in
assembly language, and builds object modules that you can link with
modules written in C or other languages.
cc The C compiler. This describes the compiler itself, and its options
and switches.
cpp The C preprocessor. The preprocessor itself has its own options to
help you control the building of your programs.
db The symbolic debugger. With db, you can set breakpoints, single-step
through code, hot-patch binaries, and otherwise debug your programs.
It requires knowledge of 80386 assembly language.
ld The linker. This links object modules into an executable binary. The
Lexicon entry describes its switches and features.
make The programming discipline. make helps you to manage the building of
a complex program. It is indespensible for managing all but the
simplest programming projects.
nm This utility prints the contents of a program's symbol table.
sh The Bourne shell. This is of the COHERENT command interpreter. You
can write large, complex programs in the shell. These can functions,
and draw on a library of prewritten functions. The shell is one of
the most powerful tools available to a COHERENT programmer -- and one
of the most neglected.
strip
Strip the symbol table from a program. This makes most programs
significantly smaller, with no loss in functionality.
Each command is described in its own Lexicon entry.
Definitions
The following Lexicon entries give technical definitions of interest to
programmers:
address
What an ``address'' is.
alignment
What byte alignment is, and how it applies under the various machine
on which COHERENT has been implemented
ANSI A brief introduction to the ANSI Standard for Programming Language C.
arena
What an arena is, and how it applies to COHERENT programs.
array
What an array is, and elementary information on how to code it.
ASCII
The ASCII table.
bit What a bit is.
bit map
What a bit map is, and how to code it under C.
buffer
What a buffer is, and how buffering affects your languages.
byte What a byte is.
byte ordering
This describes how bytes and words are ordered on the various machines
on which COHERENT has been implemented.
calling conventions
The calling conventions for COHERENT functions. This is particularly
important if you are writing modules in assembly language.
cast How to ``coerce'' one data type into another.
cc0 The COHERENT C parser.
cc1 The COHERENT C code generator.
cc2 The COHERENT C optimizer.
cc3 The COHERENT de-compiler. It generates a file of assembly language
for your examination.
data formats
This gives the size of the common data types on the various machines
on which COHERENT has been implemented.
data types
The data types that COHERENT C recognizes.
environ
This article introduces the argument environ, which by default is the
third argument passed to the function main() in a C program. It
points to image of the process's environment.
errno
This global variable holds the error status returned by a COHERENT
system call. The article errno.h interprets the codes that can appear
in this variable.
execution
This describes how each form of the system call exec() executes a
program.
field
Description of what a field is, and how to address it.
FILE Description of the FILE structure used by STDIO routines.
file What a file is. It also goes into the ``black art'' of permissions.
file descriptor
Description of the file descriptor used by COHERENT system calls.
function
What a function is.
GMT A brief introduction to Greenwich Mean Time, which is the internal
time for every COHERENT system.
initialization
This describes the rules of initialization for C.
interrupt
What an interrupt is.
Latin 1
The table ISO Latin 1 (ISO 8859.1).
lvalue
Definition of the ``left value'' in a C expression.
macro
What a C macro is, and how COHERENT C processes them.
manifest constant
This introduces manifest constants, and lists the constants that
COHERENT defines automatically.
modulus
A definition of the modulus arithmetic operation.
NUL Definition of the NUL character.
nybble
What a ``nybble'' is.
object format
Definition of an object format.
operator
A list of the C operators. This article also gives a table of
precedence for the operators.
pattern
What a pattern is.
pointer
What a pointer is, and tips for using pointers with COHERENT C.
portability
This gives some tips on how to write portable programs.
POSIX Standard
A brief introduction to the POSIX Standard
random access
A definition of random access.
read-only memory
A definition of ROM, or ``read-only memory''.
recursion
A definition of this programming technique.
rvalue
Definition of the ``right value'' in a C expression.
signame
This global array holds a string that describes the signal that a
program has received.
stack
A definition of the program stack, and how to manipulate it under
COHERENT C.
standard error
Definition of the standard-error device.
standard input
Definition of the standard-input device.
standard output
Definition of the standard-output device.
stderr
The file descriptor of the standard-error device.
stdin
The file descriptor of the standard-input device.
STDIO
Definition of STDIO -- i.e., ``standard input and output''.
stdout
The file descriptor of the standard-output device.
storage class
This entry summarizes the classes of storage that COHERENT C
recognizes.
stream
Definition of a file stream.
STREAMS
This article summarizes the COHERENT implemenation of STREAMS.
structure
Definition of a structure, and basic information on how to code it.
structure assignment
This details structure assigment under COHERENT C.
stty Summary of the stty interface to terminals.
termio
Introduction to the termio terminal interface.
termios
This summarizes the POSIX Standard extensions to the termio terminal
interface.
type checking
This details type checking under COHERENT C.
type promotion
This details type promotion under COHERENT C.
Other Languages
COHERENT includes the following programming languages:
awk This interpreted language lets you write programs for text processing.
It is especially good at processing tabular information, thus letting
you quickly write simple data-base programs.
bc bc is a calculator program that offers infinite magnitude and infinite
precision. This is an interpreted langauge that you can program on
the fly to perform simple tasks, such as computing interest payments
on the national debt. You can also write programs that you can run
repeatedly. These can also take advantage of a library of routines
already written for you.
lex This program reads a set of lexical analysis rules that you write in a
standard form, and generates a C program that you can compile and run.
yacc This program reads a set of parsing rules that you write in Backus-
Naur Form, and generates a C program that you can compile and run.
You can use with code generated by lex to write complex programs, such
as compilers.
Each of these languages is described in a Lexicon article. The front of
the manual has a tutorial for each.
See Also
Administering COHERENT,
C language,
COHERENT,
commands,
libraries,
Using COHERENT