Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pc(1) — Duplix 5.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

prof(1)

gprof(1)

adb(1)

dbx(1)

ld(1)

cc(1)

f77(1)

cc(1)

PC(1)  —  Unix Programmer’s Manual

NAME

pc − Pascal compiler

SYNOPSIS

pc [ options ] files

DESCRIPTION

pc is an optimizing ISO and/or ANSI/IEEE Pascal compiler.  pc accepts several types of arguments:

Arguments whose names end with “.p” are Pascal source programs.  They are compiled and left in a “.o” file in the working directory. 

Arguments whose names end with “.f” are Fortran 77 source programs.  They are compiled and left in a “.o” file in the working directory. 

The f77(1) and cc(1) commands are normally used for Fortran and C programs.  When multi-lingual programs need to be compiled, you can use any one of the three commands (cc, pc, or f77). 

Arguments whose names end with “.s” are assembly language source programs.  They are assembled and left in a “.o” file in the working directory. 

If you compile and link a single source file, pc deletes the “.o” file. 

pc creates “.s” files for each module only if the user compiles with the −S option. 

OPTIONS

pc accepts the following options.  Additional options are supported by ld(1). 

−20 Generates code for a 68020 CPU. To maintain compatibility with old code, the alignment rules are not changed unless you specify -X134. This alignment forces longwords to 32 bit boundaries,. 

−c Compiles to the “.o” level only. Does not link. 

−C Compiles code to perform runtime checks, verifies assert calls, and initializes all variables to zero as in pi. 

−f Generates code for a 68881 coprocessor.  By default many of the functions supported by the 68881 will be inline as well.  Use -Z129 if you want a transcendental call to go to the routine instead.  The −f option does not support profiling. 

−g Generates BSD style debugger information in the assembly file for use with a debugger such as dbx(2). 

−ga Generates a stack frame for every routine, regardless of need. 

−Idir Looks for “.include” files whose names do not begin with “/” first in the directory of the file argument, then in directories named in −I options, then in /f2/usr/include/f1. 

−o output Names the final output file output. With this option, pc leaves the file “a.out” undisturbed.  This does not apply to assembly output. 

−O Performs various speed optimizations while avoiding loop optimizations that expand code and memory optimizations that are unsuitable for asynchronous memory accesses. 

−O2 This option is an older version of the −OM flag.  It allows backwards compatibility. 

−OL Optimizes the program to be as fast as possible even if it makes the program larger. In particular, most of the available resources are allocated to optimizations of the innermost loops.  It is  counter-productive to specify −OL on code that contains no loops or that is rarely executed as it makes the whole program larger but not necessarily faster. 

−OM Specifies that memory locations do not change except by explicit stores. The optimizer is guaranteed that no memory locations are I/O device registers that can be changed by external hardware and no memory locations are being shared with other processes that can change them asynchronously with respect to the correct process. 

−OLM This option is equivalent to -OL and -OM. 

−OML This option is equivalent to -OL and -OM. 

−p Generates profiling code in a manner similar to cc(1) and links the code with routines that support prof(1).  However, −p does not support programs compiled with the −f (floating point) option.  (Not implemented.) 

−pg Generates profiling code similar to −p but links with a more involved profiling mechanism that supports gprof(1).  Like the −p option, −pg does not support profiling for programs compiled with the −f (floating point) option.  (Not implemented.) 

−R Makes initialized variables part of the text segment and passes them on to as. 

−S Compiles the named C programs and leaves the assembler-language output on corresponding files suffixed “.s”. 

−w Suppresses warning messages. 

−Xn Turns on option n (an integer constant).  Numerous options are available for such things as signed bit fields, short return types, etc.  Section 8 of the UNIX Compiler Guide:  C, Pascal, FORTRAN 77 describes these options. 

−Zn Turns off option n (on by default or turned on with the X option). 

FILES

file.pPascal source file
/bin/asassembler
/usr/lib/pcomPascal compiler
/usr/lib/libc.aUNIX standard I/O library
/usr/lib/libc_p.aprofiling UNIX standard I/O library
/usr/lib/libmc.aUNIX standard I/O library for the 68020/68881
/usr/lib/libpc.aPascal I/O library with math intrinsics
/usr/lib/libpc_p.aprofiling Pascal I/O library with math intrinsics
/usr/lib/libm.a intrinsic floating point math library
/usr/lib/libm_p.aprofiling intrinsic floating point library
/usr/lib/libmm.a68020/68881 intrinsic floating point math library
/usr/lib/gcrt0.o∗profiling startup code
/lib/mcrt0.o∗profiling startup code
mon.outfile produced for analysis by prof(1)
gmon.outfile produced for analysis by gprof(1)

SEE ALSO

Kathleen Jensen and Niklaus Wirth, Pascal User Manual and Report, Springer-Verlag, 1978

American National Standard Pascal Computer Programming Language,
  IEEE/John Wiley-Interscience, 1983

UNIX Compiler Guide:  C, Pascal, FORTRAN 77
as(1)
, prof(1), gprof(1), adb(1), dbx(1), ld(1), cc(1), f77(1), cc(1)

DIAGNOSTICS

The diagnostics produced by the Pascal compiler are self-explanatory and similar to those produced by the BSD pc compiler.  Occasional messages can be produced by the assembler or loader. 

4th Berkeley Distribution  —  March 6, 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026