1987-05-13 14:55:34 +00:00
|
|
|
.TH MODULA\-2 1ACK
|
1987-04-14 11:11:03 +00:00
|
|
|
.ad
|
|
|
|
.SH NAME
|
|
|
|
Modula-2 \- ACK Modula-2 compiler
|
|
|
|
.SH SYNOPSIS
|
|
|
|
\fBack\fR \-m\fImach\fR files
|
|
|
|
.br
|
|
|
|
\fImach\fR files
|
|
|
|
.SH INTRODUCTION
|
|
|
|
This document provides a short introduction to the use of the ACK Modula-2
|
|
|
|
compiler. It also
|
|
|
|
tells you where to find definition modules for "standard" modules.
|
|
|
|
.SH FILENAMES
|
|
|
|
Usually, a Modula-2 program consists of several definition and implementation
|
|
|
|
modules, and one program module.
|
|
|
|
Definition modules must reside in files with names having a ".def" extension.
|
|
|
|
Implementation modules and program modules must reside in files having a
|
|
|
|
".mod" extension.
|
|
|
|
.PP
|
|
|
|
The name of the file in which a definition module is stored must be the same as
|
|
|
|
the module-name, apart from the extension.
|
|
|
|
Also, in most Unix systems filenames are only 14 characters long.
|
|
|
|
So, given an IMPORT declaration for a module called "LongModulName",
|
|
|
|
the compiler will try to open a file called "LongModulN.def".
|
|
|
|
The requirement does not hold for implementation or program modules,
|
|
|
|
but is certainly recommended.
|
|
|
|
.SH CALLING THE COMPILER
|
|
|
|
The easiest way to do this is to let the \fIack\fR(1) program do it for you.
|
|
|
|
So, to compile a program module "prog.mod", just call
|
|
|
|
.DS
|
|
|
|
\fBack\fR \-m\fImach\fR prog.mod [ objects of implementation modules ]
|
|
|
|
or
|
|
|
|
\fImach\fR prog.mod [ objects of implementation modules ]
|
|
|
|
.DE
|
|
|
|
where \fImach\fR is one of the target machines of ACK.
|
|
|
|
.PP
|
|
|
|
To compile an implementation module, use the \-\fBc\fR flag
|
|
|
|
to produce a ".o" file.
|
|
|
|
Definition modules can not be compiled; the compiler reads them when they are
|
|
|
|
needed.
|
|
|
|
.PP
|
|
|
|
For more details on the \fIack\fR program see \fIack\fR(1).
|
|
|
|
.SH DEFINITION MODULES
|
|
|
|
"Standard" definition modules can be found in
|
1987-05-13 14:55:34 +00:00
|
|
|
the directory \fB~em/lib/m2\fR.
|
1987-04-14 11:11:03 +00:00
|
|
|
.PP
|
|
|
|
When the compiler needs a definition module, it is first searched for
|
|
|
|
in the current directory, then in the directories given to it by the
|
|
|
|
\-\fBI\fR flag
|
|
|
|
in the order given,
|
1987-05-13 14:55:34 +00:00
|
|
|
and then in the directory mentioned above.
|
1987-04-14 11:11:03 +00:00
|
|
|
.SH FLAGS
|
|
|
|
The \fIack\fR(1) program recognizes (among others) the following
|
|
|
|
flags, that are passed to the Modula-2 compiler:
|
|
|
|
.IP \fB\-I\fIdirname\fR
|
|
|
|
.br
|
|
|
|
append \fIdirname\fR to the list of directories where definition modules
|
|
|
|
are looked for.
|
|
|
|
.IP \fB\-I\fP
|
|
|
|
don't look in
|
1987-05-13 14:55:34 +00:00
|
|
|
the directory \fB~em/lib/m2\fR.
|
1987-04-14 11:11:03 +00:00
|
|
|
.IP \fB\-M\fP\fIn\fP
|
|
|
|
set maximum identifier length to \fIn\fR. The minimum value of \fIn\fR
|
|
|
|
is 14, because the keyword "IMPLEMENTATION" is that long.
|
|
|
|
.IP \fB\-n\fR
|
|
|
|
do not generate EM register messages.
|
|
|
|
The user-declared variables will not be stored into registers on the target
|
|
|
|
machine.
|
|
|
|
.IP \fB\-L\fR
|
|
|
|
do not generate the EM \fBfil\fR and \fBlin\fR instructions that enable
|
|
|
|
an interpreter to keep track of the current location in the source code.
|
|
|
|
.IP \fB\-w\fR\fIclasses\fR
|
|
|
|
suppress warning messages whose class is a member of \fIclasses\fR.
|
|
|
|
Currently, there are three classes: \fBO\fR, indicating old-flashioned use,
|
|
|
|
\fBW\fR, indicating "ordinary" warnings, and \fBR\fR, indicating
|
|
|
|
restricted Modula-2.
|
|
|
|
If no \fIclasses\fR are given, all warnings are suppressed.
|
|
|
|
By default, warnings in class \fBO\fR and \fBW\fR are given.
|
|
|
|
.IP \fB\-W\fR\fIclasses\fR
|
|
|
|
allow for warning messages whose class is a member of \fIclasses\fR.
|
|
|
|
.IP \fB\-x\fR
|
|
|
|
make all procedure names global, so that \fIadb\fR(1) understands them.
|
1987-06-29 12:46:00 +00:00
|
|
|
.IP \fB\-Xs\fR
|
|
|
|
make INTEGER ranges symmetric, t.i., MIN(INTEGER) = - MAX(INTEGER).
|
|
|
|
This is useful for interpreters that use the "real" MIN(INTEGER) to
|
|
|
|
indicate "undefined".
|
1987-04-14 11:11:03 +00:00
|
|
|
.LP
|
|
|
|
.SH SEE ALSO
|
1987-05-13 14:55:34 +00:00
|
|
|
\fIack\fR(1), \fIem_m2\fR(6)
|
1987-04-14 11:11:03 +00:00
|
|
|
.SH FILES
|
|
|
|
.IR ~em/lib/em_m2 :
|
|
|
|
binary of the Modula-2 compiler.
|
|
|
|
.SH DIAGNOSTICS
|
|
|
|
All warning and error messages are written on standard error output.
|
|
|
|
.SH REMARKS
|
|
|
|
Debugging and profiling facilities may be present during the development
|
|
|
|
of \fIem_m2\fP.
|