Trailing-Edge
-
PDP-10 Archives
-
decuslib20-03
-
decus/20-0078/imp/simimp.man
There is 1 other file named simimp.man in the archive. Click here to see a list.
DDD EEEE CCC
D D E C
D D EEE C
D D E C
DDD EEEE CCC
SSS Y Y SSS TTTTT EEEE M M 1 00
S Y Y S T E MM MM 11 0 0
SS Y SS T EEE M M M ==== 1 0 0
S Y S T E M M 1 0 0
SSS Y SSS T EEEE M M 1 00
SSS III M M U U L AA
S I MM MM U U L A A
SS I M M M U U L AAAA
S I M M U U L A A
SSS III M M UU LLLLL A A
III M M PPP L EEE M M EEE N N TTT AA TTT III OO N N
I MM MM P P L E MM MM E N N T A A T I O O N N
I M M M PPP L EE M M M EE NN N T AAAA T I O O NN N
I M M P L E M M E N NN T A A T I O O N NN
III M M P LLL EEE M M EEE N N T A A T III OO N N
GGG U U III DDD EEEE
G U U I D D E
G U U I D D EEE
G GG U U I D D E
GGG UU III DDD EEEE
AUGUST 1978
Published by the
Swedish National Defence Research Institute
Section 142 (Datalogy)
S-10450 Stockholm 80
SWEDEN
DECsystem-10/20 SIMULA Implementation Manual Page 1
Swedish National Defense Research Institute HE1 Report
Department 1 C8400-M3(E5)
S-10450 Stockholm 80 Aug 1978
DECsystem-10/20 SIMULA (1) IMPLEMENTATION MANUAL
1974-11-07
UPDATED 74-12-11, 75-02-27, 75-04-18, 75-09-08, 76-03-17,
77-01-17, 77-11-08, 78-01-25, 78-08-23
By Reidar Karlsson and Lars Enderin
ABSTRACT: This manual contains information which may be
useful if you want to set up a SIMULA system on a
DECsystem-10 installation running TOPS-10 or a DECsystem-20
installation (2) running TOPS-20.
The contents of the SIMULA distribution tape are described,
as well as procedures for testing that SIMULA works and for
loading the SIMULA system to the SYS area of your computer.
If you only want to compile and run SIMULA programs at your
installation, sections 2.1 and 2.2 of this document will
tell you all you need for this purpose.
Most of the information in the manual is intended for those
who want to make their own modifications to the SIMULA
system, or who want to make the SIMULA modifications to the
COMPIL (EXEC in TOPS-20), LINK and SPRINT system programs
(to make them recognize that the extension ".SIM" means that
a file should be compiled with SIMULA etc.) These
modifications are not necessary, but will make SIMULA
programming more convenient.
This document reflects the software as of version 4A(310) of
DECsystem-10/20 SIMULA.
SEARCH KEY: Computer, Programming, Programming Language,
Algol, Simula, Digital Equipment Corporation, DEC, PDP,
DECsystem-10, DECsystem-20, TOPS-10, TOPS-20, Compiler,
Implementation.
- - - - - - - - - - - -
(1) SIMULA is a registered trademark of the Norwegian Computing
Center
(2) The TOPS-20 version is not fully supported in this
distribution of SIMULA release 4.
DECsystem-10/20 SIMULA Implementation Manual Page 2
CONTENTS
CONTENTS
========
1 INTRODUCTION
2 THE SIMULA TAPE
2.1 SIMULA SYSTEM FILES
2.1.1 TOPS-10 files (SIMSYS)
2.1.2 TOPS-20 files (SIMS20)
2.1.3 Documentation files (SIMDOC)
2.2 SETTING UP THE SIMULA SYSTEM
2.2.1 Compatibility with older SIMULA versions
2.2.2 Functional test of the SIMULA system
2.2.3 Changes in system programs
2.3 SETTING UP THE SIMULA SYSTEM FROM REL FILES
2.4 COMPILER FILES
2.4.1 Common files (SIMCOM)
2.4.2 Pass 1 files (SIMP1)
2.4.3 Pass 2 files (SIMP2)
2.4.4 Pass 3 files (SIMP3)
2.5 RUN TIME SYSTEM FILES (SIMRTS)
2.6 SIMDDT FILES (SIMDDT)
2.7 TOPS-20 VERSIONS OF SOURCE AND REL FILES (SIMT20)
2.8 UTILITY PROGRAMS (SIMUTI)
2.9 SIMULA PROGRAM LIBRARY (LIBSIM)
2.10 MAINTENANCE FILES (SIMMNT)
2.11 SIMULA DEMONSTRATION PROGRAMS (SIMDEM)
3 HOW TO CREATE A TEST VERSION
3.1 THE QSYS SWITCH
3.2 THE QDEBUG SWITCH
3.3 THE QTRACE SWITCH
3.4 TEST VERSION GENERATION
4 MODIFICATIONS TO DEC SYSTEM PROGRAMS
4.1 MODIFICATIONS TO COMPIL (OR EXEC)
4.2.1 COMPIL changes (TOPS-10)
4.2.2 EXEC changes (TOPS-20)
4.2 MODIFICATIONS TO LINK-10 MODULES
4.3 MODIFICATIONS TO SPRINT-10
DECsystem-10/20 SIMULA Implementation Manual Page 3
CONTENTS
5 STORAGE ALLOCATION ALGORITHMS
APPENDIX A. FILCOM LISTINGS
A.1 COMPIL.MAC
A.2 LNKPAR.MAC
A.3 LNKERR.MAC
A.4 LNKWLD.MAC
A.5 SPRINT.MAC
DECsystem-10/20 SIMULA Implementation Manual Page 4
Chapter 1 INTRODUCTION
1 INTRODUCTION
============
This document is primarily intended as an implementation
handbook for system programmers faced with the task of
installing the SIMULA system at a DECsystem-10 site with a
KI10 or KL10 CPU (TOPS-10 monitor), or at a DECsystem-20
site (TOPS-20 monitor).
WARNING
As of August 1978, the TOPS-20 version is not
satisfactorily tested because of lack of proper
testing facilities. It may have trouble with file
handling and other areas where TOPS-20 differs from
TOPS-10 significantly.
Information is included on how to update any part of the
SIMULA system, and how to generate a test version of the
whole system with several debugging facilities.
If you make your own modifications to the compiler or run
time system, then you should clearly indicate this to all
users by a line on each program listing and a message to the
TTY when running the compiler.
The name SIMULA is a trade-mark of the Norwegian Computing
Center. This name may only be used on systems compatible
with the SIMULA standard. If you modify the system so that
this is no longer true, you should not call it SIMULA.
The version of SIMULA described here cannot be run on a KA10
CPU. Enquiries about the KA10 version of the SIMULA system
should be directed to the School of Computer Science, Acadia
University, Wolfville, Nova Scotia, Canada B0P 1X0, Att:
Wayne M. Brehaut, Ass. Professor.
This manual is supplied in RUNOFF format on the SIMULA tape
as SIMIMP.RNM.
The following references are used:
[TD] DECsystem-10/20 SIMULA Technical Documentation.
[LH2] DECsystem-10 SIMULA Language Handbook, part II.
[LH3] DECsystem-10 SIMULA Language Handbook, part III.
DECsystem-10/20 SIMULA Implementation Manual Page 5
Chapter 2 THE SIMULA TAPE
2 THE SIMULA TAPE
===============
The SIMULA system files are distributed as a BACKUP tape
written in INTERCHANGE mode and containing several save
sets. The TOPS-10 BACKUP program or the TOPS-20 DUMPER
program can be used to read the tape. The SIMULA files are
described in this chapter.
CTL and CMD files are only guides and may need to be
modified.
The SIMULA run time system is referred to as SIMRTS or
simply RTS in this document.
The first saveset on the tape, "SIMIMP - SIMULA
Implementation Guide", contains this document (SIMIMP.MAN)
and SIMIMP.RNM.
2.1 SIMULA SYSTEM FILES
These files are necessary to run SIMULA and should be on
system areas.
2.1.1 TOPS-10 files
Saveset: SIMSYS
SYS:
---
Compiler files
SIMULA.EXE ;Compiler pass 1
SIMP2 .EXE ;Pass 2
SIMP3 .EXE ;Pass 3
SIMERR.ERR ;Error messages for the compiler
; (coded compactly)
Run time files
SIMR40.EXE ;Run time system, single high segment
SIMR41.EXE ;RTS hiseg, normal twoseg version
SIMR42.EXE ;RTS hiseg, initial twoseg version
SIMLIB.REL ;RTS library routines
DECsystem-10/20 SIMULA Implementation Manual Page 6
Chapter 2 THE SIMULA TAPE
System support files
SIMDD4.ABS ;SIMDDT debugging system (self-relocating)
LIBSIM.ATR ;SIMULA utilities library (attributes)
;Attributes are read by compiler to ensure
;correct interfaces to classes and procedures
LIBSIM.REL ;Relocatable code for utility classes and
;procedures
SIMDIR.EXE ;Shows external module interdependence
SIMATR.EXE ;Displays ATR file information
SIMED .EXE ;Tidies SIMULA program layout (see [LH2])
SAFEIO.ENG ;Message file for SAFEIO class (LIBSIM module)
SAFEIO.SWE ;Swedish version of messages
REL:
---
SIMHGH.REL ;Library of REL modules used in high segment
; (same routines as included in SIMR40.EXE)
MAKSHR.REL ;Used for making a high segment SIMULA program
HLP:
---
SIMATR.HLP ;How to run SIMATR.EXE
SIMCOM.HLP ;Compilation help file
SIMDDT.HLP ;Debugging help file
SIMDIR.HLP ;How to use SIMDIR
SIMHGH.HLP ;Help file for using SIMHGH.REL and MAKSHR.REL
SIMRTS.HLP ;Execution help file
SIMULA.HLP ;General help file
MIC:
---
LIBSIM.MIC ;for handling your own LIBSIM.ATR and LIBSIM.REL.
UNV:
---
MACSIM.UNV ;for definition of symbols useful in MACRO-10
;subroutines. See [LH2] Appendix E.
DECsystem-10/20 SIMULA Implementation Manual Page 7
Chapter 2 THE SIMULA TAPE
2.1.2 TOPS-20 SIMULA system files
Saveset: SIMS20
The following files replace corresponding files for TOPS-10:
SIMULA.EXE Compiler (all three passes).
Replaces SIMULA, SIMP2, SIMP3.
SIMR40.EXE Run time system. Replaces (SIMR40, SIMR41,
SIMR42).
SIMED .EXE Loaded with TOPS-20 version of SIMLIB.REL
SIMLIB.REL Should have TOPS-20 version of OCSP.
SIMHGH.REL Should have TOPS-20 versions of IONF, OCIN, OCIO.
SIMULA.HLP
SIMCOM.HLP
SIMRTS.HLP
LIBSIM.ATR Some modules may have to
LIBSIM.REL be replaced, otherwise
identical to TOPS-10 files.
SLEEP .REL Replaces SLEEP in LIBSIM.REL (Use MAKLIB)
The following TOPS-10 files are unchanged:
SIMERR.ERR
SIMDD4.ABS
SAFEIO.ENG
SAFEIO.SWE
SIMDDT.HLP
Note! SIMDIR.EXE will not run correctly. SIMATR.EXE
will not handle wildcard file names (expects TOPS-10 UFD
format).
2.1.3 Documentation files
Saveset: SIMDOC.
The following file should be copied to the DOC: area:
SIMULA.DOC ;Details of SIMULA system updates
If you can afford disk space:
SIMLH1.MAN ;SIMULA Language Handbook part I
SIMLH2.MAN ; d:o part II
SIMLH3.MAN ; d:o part III
Other files in the saveset are not essential, but could be
useful. For example, RUNOFF input files are supplied.
DECsystem-10/20 SIMULA Implementation Manual Page 8
Chapter 2 THE SIMULA TAPE
2.2 SETTING UP THE SIMULA SYSTEM
The preceding sections specify the files necessary to get
the SIMULA system on the air. You will have to perform some
checking before bringing up the system, at least if you
already have an older SIMULA system. You may elect (a) to
save the old system on OLD: or (b) to put the new system on
NEW: for some time. Since the new system will be checked
out more thoroughly on SYS, alternative (a) is recommended.
2.2.1 Compatibility with older SIMULA versions
If you want to run old .SAV or .EXE files from version 2 or
3 of SIMULA, you should keep SIMR21.SHR, SIMR22.SHR and
SIMDDT.ABS on SYS:. Starting with version 4, the RTS files
and the SIMDDT debugging system are named to show the
version: SIMR4x.EXE, SIMDD4.ABS (x=0, 1 or 2). Preferably,
however, old programs should be reloaded to take advantage
of the new corrections and facilities. REL files produced
by SIMULA version 3 can be used with version 4. It is not
recommended to keep still older versions (1B) of SIMULA.
Note, e.g., that ATR files from version 1B cannot be placed
in libraries. See SIMULA.DOC.
2.2.2 Functional test of the SIMULA system
You may test SIMULA on your own area before copying to
system areas. Put the system files on some area
([proj,prog] or <dir>).
TOPS-10 commands:
.R SETSRC
*LIB:[proj,prog] ;Only if not your own area
*SYS
*^C
.ASSIGN DSK SYS
TOPS-20:
@DEFINE SYS: <dir>, SYS:
or
@DEFINE SYS: DSK:, SYS:
HLP: may also have to be ASSIGNed or DEFINEd.
Try compiling and executing some demonstration program,
possibly invoking SIMDDT by ^C-REENTER or via the DEBUG
command.
If you have a SIMULA system already, you probably know what
you want to test. If you do not have SIMULA, you might as
well put the system on the SYS area without a special test.
DECsystem-10/20 SIMULA Implementation Manual Page 9
Chapter 2 THE SIMULA TAPE
2.2.3 Changes in system programs
To make it possible to use the SIMULA system automatically
via the COMPIL class commands and the batch processor, the
special SIMULA changes must be made in COMPIL (TOPS-20
EXEC), LINK and SPRINT-10. We hope that DEC will include
these changes in future versions (LINK-10 2B and LINK-20
already have the changes), but until then correction files
created by the CAM program in the SOftware Updating Package
(SOUP) are supplied to facilitate updating of your own
versions. The SOUP programs are described in the
DECsystem-10 Software Notebooks. The correction files are
named:
COMPIL.COR to update COMPIL.MAC 22B(236)
LNKPAR.CO1 to update LNKPAR.MAC 1B(131)
LNKPAR.COR to update LNKPAR.MAC 2A(244)
LNKWLD.CO1 to update LNKWLD.MAC 1B(131)
LNKLOD.COR to update LNKLOD.MAC 2A(244)
LNKERR.CO1 to update LNKERR.MAC 1B(131)
LNKERR.COR to update LNKERR.MAC 2B(244)
SPRINT.COR to update SPRINT.MAC 2(1035)
These files are found in saveset SIMMNT. The changes are
documented in Chapter 4 MODIFICATIONS TO DEC SYSTEM
PROGRAMS.
FILCOM listings can be found in Appendix A. The changes
necessary in the TOPS-20 EXEC are also documented there.
2.3 SETTING UP SIMULA FROM REL FILES
All REL files needed to load a new SYS version are supplied.
This will save a lot of reassembling work if just a single
module has to be modified. The REL files are contained in
savesets SIMCOM, SIMP1, SIMP2, SIMP3, SIMRTS.
SIMULA.CTL shows how to load and save the SIMULA system .EXE
files.
SIMLIB.CTL assumes the existence of FORLIB.REL on the SYS
area containing the modules:
ACOS. ASIN. ATAN. SQRT. SINH. COSH.
TANH. EXP1 EXP2 EXP3 EXP. ALOG.
SIN. DEXP. DEXP.2 DEXP.3 DLOG. DSQRT.
DSIN. DATAN. FORXIT CFRXIT EXIDOT
If FORLIB is not available the distributed SIMLIB.REL can be
used as a basis.
LIBSIM.MIC can be used to maintain LIBSIM.ATR and
LIBSIM.REL, if the MIC (Macro Interpreted Commands) system
DECsystem-10/20 SIMULA Implementation Manual Page 10
Chapter 2 THE SIMULA TAPE
is available (DEC-10, monitor version 6.03 or higher only).
If MIC is not available, use FUDGE2 or MAKLIB. Note that
the ATR library MUST be indexed! The REL library should
also be indexed to speed up loading.
2.4 COMPILER FILES
A wild card (*) extension in the following means that both
.MAC and .REL files exist.
2.4.1 Common files
Saveset: SIMCOM.
2.4.1.1 UNIVERSAL files
Five parameter (UNIVERSAL) files are used to assemble the
source code modules in the SIMULA system. The .UNV files
are created from the corresponding .MAC files, possibly with
a "prefix" file (see below):
SIMMAC.UNV ;Common definitions of macros and assembly
;time constants
SIMMC1.UNV ;Pass 1 parameters, macros and constants
SIMMC2.UNV ;Pass 2 parameters, macros and constants
SIMMC3.UNV ;Pass 3 parameters, macros and constants
SIMMCR.UNV ;RTS field and symbol definitions
SIMRPA.UNV ;Additional RTS parameters, macros and constants
2.4.1.2 Prefix files
The following files may be used as prefixes to SIMMAC.MAC to
change default parameter settings:
SIMPRM.MAC ;TOPS-10
SIMP20.MAC ;TOPS-20
2.4.1.4 Common MAC and REL files
The REL files are loaded in all 3 passes.
DM .*
LOWSEG.* (1)
DECsystem-10/20 SIMULA Implementation Manual Page 11
Chapter 2 THE SIMULA TAPE
TRACE .* ;Only in trace version
SIMULA.CTL shows how to set up the SIMULA system from the
REL files.
2.4.2 Pass 1 files
Saveset: SIMP1.
I1 .* (1)
D1 .*
DP .*
LC .*
LS .*
O1 .* (1)
P1DUMP.* ;Test version only
SD .*
SH .*
SM .*
SP .*
SR .*
SYS1 .*
T1 .* (1)
TRACEI.* ;Test version only, must be loaded as the
; last module in pass 1 if the compiler
; should be traced.
REL:HELPER.REL is also needed (may be on SYS:)
2.4.3 Pass 2 files
Saveset: SIMP2.
I2 .* (1)
CA .*
CADB .* ;Test version only
CARL .*
CGCW .*
CGIW .*
CGOB .*
CGPA .*
CGRK .*
CGSA .*
DBDT .* ;Test version only
EX .*
M2 .*
- - - - - - - - - - - -
(1) The .MAC file must be compiled with the TOPS-20 version of
SIMMAC.UNV to yield the TOPS-20 version - the normal version is
for TOPS-10.
DECsystem-10/20 SIMULA Implementation Manual Page 12
Chapter 2 THE SIMULA TAPE
O2 .*
O2RK .*
O2SA .* (1)
OD .*
OR .*
OREA .*
ORRK
2.4.4 Pass 3 files
Saveset: SIMP3.
I3 .* (1)
E3 .* (1)
M3 .*
O3 .* (1)
SIMXRF.*
T3 .* (1)
TRACEB.* ;Test version only, must be loaded as the
; last module in pass 3 if the compiler
; should be traced.
2.5 RUN TIME FILES
Saveset: SIMRTS.
High segment files
CP .*
CS .*
CSSADM.* ;Only used in SIMR42.EXE
IO .*
IOED .*
IONF .* (1)
OCEP .*
OCIN .* (1)
OCIO .* (1)
PH .*
RTRACE.* ;Test version only, must be loaded as the
; last module in a one segment version of
; the run time system if the RTS should
; be traced.
SA .*
SADB .* ;Test version only, currently not usable
- - - - - - - - - - - -
(1) The .MAC file must be compiled with the TOPS-20 version of
SIMMAC.UNV to yield the TOPS-20 version - the normal version is
for TOPS-10.
DECsystem-10/20 SIMULA Implementation Manual Page 13
Chapter 2 THE SIMULA TAPE
SIMRT1.PRE ;Prefix file for SIMRTS.MAC
SIMRT1.REL ;Generated from SIMRT1.PRE+SIMRTS.MAC
SIMRT2.PRE ;Prefix file for SIMRTS.MAC
SIMRT2.REL ;Generated from SIMRT2.PRE+SIMRTS.MAC
SIMRTS.* ;One seg version
TX .*
TXBL .*
REL:HELPER.REL is also needed (maybe SYS: instead of REL:)
SIMLIB modules (low segment)
MA .*
MAT .*
OCSP .* (1)
OCSP0.REL ;One seg version created
;from OCSP0.PRE+OCSP.MAC
PHFO .*
PHPT .*
RD .*
SANE .*
SS .*
SU .*
2.6 SIMDDT FILES
Saveset: SIMDDT.
SIMEDS.MAC, which contains the run time error messages, is
created by the utility program SUTEDS using SIMLH2.RNO as an
input file. SIMLH2.RNO can be a copy of SIMLH2.RNM or just
appendix D of that file.
See SIMULA.CTL.
The following source files, when compiled as one combined
file, will generate SIMDDT.REL. Gives SIMDDn.ABS (n=version
no) when executed with SUTABS.REL (See SIMMNT).
SIMDS1.MAC
SIMDS2.MAC
SIMDS3.MAC
SIMDS8.MAC
SIMEDS.MAC
SIMDS9.MAC
SIMDS7.MAC
DECsystem-10/20 SIMULA Implementation Manual Page 14
Chapter 2 THE SIMULA TAPE
2.7 TOPS-20 SIMULA SYSTEM SOURCE AND REL FILES
Saveset: SIMT20.
Most REL files, and almost all source (.MAC) files for
TOPS-20 are identical to the TOPS-10 files. The TOPS-20 REL
files are obtained by compilation with the following .UNV
files:
SIMMAC.UNV ;TOPS-20 version
MONSYM.UNV ;TOPS-20 version 2, Jan 1977
UUOSYM.UNV ;TOPS-10 version 6.03
Those files are supplied in this saveset for convenience.
The following modules should be substituted for TOPS-10
versions:
Compiler files:
LOWSEG.REL
I1 .REL
O1 .REL
T1 .REL
I2 .REL
O2SA .REL
I3 .REL
E3 .REL
O3 .REL
T3 .REL
HIEND .* ;Addition. Defines YHIEND, must be
; loaded just before LOWSEG
RTS files:
IONF .REL
OCIN .REL
OCIO .REL
SIMRTS.REL ;Replaces SIMRT?.REL
OCSP .REL
Adaption to run SIMULA on TOPS-20 version 1B (system is
generated for version 2):
V1B .* ;Resolves external references STPPN%,
;PPNST%, DIRST%
To be loaded in SIMULA.EXE and SIMR40.EXE.
SIMULA.CMD and SIMRTS.CMD are also provided for loading the
EXE files.
DECsystem-10/20 SIMULA Implementation Manual Page 15
Chapter 2 THE SIMULA TAPE
2.8 UTILITY PROGRAMS
Saveset: SIMUTI.
Various programs, e.g. for conversion between different
SIMULA dialects, formatting SIMULA programs, performing
measurements on SIMULA programs, etc. Described in [LH2],
App. L, M, N. SIMDIR.MAC is also placed here.
2.9 SIMULA PROGRAM LIBRARY
Saveset: LIBSIM.
The library contains external modules (classes and
procedures) of general interest to users of SIMULA on the
DECsystem-10/20.
Examples:
- Useful program packages written in SIMULA such as data
base packages, graphic packages, conversational I/O
packages.
- Useful MACRO-10 procedures to be called from SIMULA, e.g.
for object and binary I/O, access to monitor facilities like
the clock.
The modules in this library are described in [LH3].
LIBSIM.ATR and LIBSIM.REL should be on SYS: (they are in
saveset SIMSYS). Source (.MAC and .SIM) files and
documentation files are placed in this saveset.
2.10 MAINTENANCE PROGRAMS
Saveset: SIMMNT.
For a detailed description of these programs refer to [TD]
Chapter V. UTILITY PROGRAMS.
The parts of the DECsystem-10/20 SIMULA Technical
Documentation [TD] created as RUNOFF files or other
DECsystem-10/20 files are also supplied here (* stands for
MEM and RNO):
TDHDR .* Header and copyright pages
TDCONT.* Table of contents
TDI .* Sections I.1-I.3 (System description)
DECsystem-10/20 SIMULA Implementation Manual Page 16
Chapter 2 THE SIMULA TAPE
TDI8 .* Sect I.8 (Documentation standard)
TDII .* Sect II.1-II.A (Compiler description, general and
pass 1)
TDIID .* Sect II.D (HIDDEN/PROTECTED implementation)
TDIII .* Sect III (RTS description)
TDIV .* Sect IV (SIMDDT debugging system)
TDVII .MEM Index, produced from TDINDX.USR (see TDI8)
TDVIII.* Names of source files
TDREV6.MEM Summary of revision 6 to [TD]
TDINDX.USR Input to INDEX program (see TDI8)
The .MEM files have been post-edited following the RUNOFF
execution by application of simple SOS command files to
change page numbering and insert blank lines after the
subheading. Most of those command files are supplied as the
files ED*. The files listed above correspond to about 50%
of [TD]. Some significant sections are still only available
as copies from a type-written original:
Sect I.4-I.6 on code generation, data formats, parameter
files. Sect I.7 KA-10 considerations. Sect I.9 Programming
standard. Sect I.10 Test standard. Sect II.B Compiler pass
2. Sect II.C Compiler pass 3. Sect V UTILITY PROGRAMS.
Sect VI Module documentation.
SUTABS.MAC is used to produce a new SIMDDn.ABS.
SUTATR.MAC is an older version of SIMATR.
SUTEDS.CBL is used to change or add run time error messages,
creating a new SIMEDS.MAC. Uses (appendix D of)
SIMLH2.RNM as input. Refer to [TD] Chapter IV.5
DIAGNOSTIC HANDLING.
SUTERR.CBL is used to change or add compile time error
messages, creating a new SIMERR.ERR. Uses
(appendix C of) SIMLH2.RNM as input. Refer also
to [TD] Chapter II.5 DIAGNOSTIC HANDLING.
The remaining utility programs were developed solely for
testing purposes.
SUTANA.MAC is used to process trace results. Output is the
file ANALYS.TRC containing statistics for the
modules that have been traced. Refer to [TD]
Chapter I.10.7 How to trace the SIMULA system.
SUTEDB.CBL with the separately compiled procedure DBSYMB.MAC
is used to edit the DEBUG output file nnnDEB.TMP.
SUTGCA.ALG with FORTRAN subroutine RF.F4 is used to analyse
the storage allocation algorithms (i.e. to
process the data on the file nnnGCP.TMP).
SUTIND.SIM is used to produce an index to the Technical
Documentation [TD].
SUTLOD.ALG is used to check and load a generated REL-file
DECsystem-10/20 SIMULA Implementation Manual Page 17
Chapter 2 THE SIMULA TAPE
and to dump the loaded program.
SUTLS1.CBL with the separately compiled procedure TYPE4.MAC
is used to dump the nnnLS1.TMP file.
SUTMAP.MAC is a routine common to SUTANA.MAC and SUTTRC.MAC.
SUTTRC.MAC is used to process trace results. Output is an
assembly listing for each traced module with the
number of executions for each instruction edited
into the left margin. Refer to [TD] Chapter
I.10.7 How to trace the SIMULA system.
2.11 SIMULA DEMONSTRATION PROGRAMS
Saveset: SIMDEM.
SIMDEM.HLP describes these programs.
DECsystem-10/20 SIMULA Implementation Manual Page 18
Chapter 3 HOW TO CREATE A TEST VERSION
3 HOW TO CREATE A TEST VERSION
============================
The SIMULA system has been debugged in a test version. This
version can still be generated by appropriate setting of
assembly time constants. The prefix parameter file
SIMPRM.MAC is introduced to simplify this. If SIMPRM is
omitted the default setting will generate a production
version for the SYS area. SIMPRM.MAC as distributed on the
SIMULA tape does not change default settings.
On DECsystem-20, use SIMP20.MAC as prefix to SIMMAC.MAC.
3.1 THE QSYS SWITCH.
The following is not applicable to DECsystem-20. Instead,
DEFINE SYS: DSK:,SYS:
If QSYS=1 swapping (GETSEG of a new high segment) in both
the compiler and the run time system will get the next
segment from the SYS area. SIMERR.ERR and SIMDDn.ABS are
also read from the SYS area. Help files are read by HELPER,
normally from device HLP:.
If QSYS=0 the SIMULA system may reside on 7 different DSK
areas by appropriate setting of the Q??PPN constants in
SIMPRM.MAC. The swapping routine in the compiler will then
automatically get SIMULA from QP1PPN, SIMP2 from QP2PPN and
SIMP3 from QP3PPN. A special feature is, however, that the
swapping routine will look for S1, S2 and S3 on your default
area before looking for SIMULA, SIMP2 and SIMP3 on the
special pass PPN:s. This can be used by a system programmer
who wants to keep a local copy of one or more passes on his
own area for testing purposes. In the same way the run time
system segments SIMR41 and SIMR42 (possibly only the single
segment SIMR40) are read from your default area in the first
place and from QRTPPN otherwise.
3.2 THE QDEBUG SWITCH
If QDEBUG=1 the ASSERT macro generates code to check the
validity of some assumptions at run time and compile time.
Certain debugging facilities such as dump and trace routines
will also be available. This system is referred to as the
test version and in [TD] Chapters I.10, II.A.6, II.B.6,
II.C.6, III.6 and IV.8 information on using these debugging
facilities is given.
DECsystem-10/20 SIMULA Implementation Manual Page 19
Chapter 3 HOW TO CREATE A TEST VERSION
3.3 THE QTRACE SWITCH
This code has not been modified for DECsystem-20.
If QTRACE=1 code is generated to make it possible to trace
the dynamic behaviour of the whole SIMULA system. Refer to
[TD] Chapter I.10.7 How to trace the SIMULA system.
3.4 TEST VERSION GENERATION
When the assembly time constants in SIMPRM.MAC are set to
appropriate values, the whole SIMULA system, or the part of
the system that should be debugged, must be reassembled.
Appropriate setting will probably be QSYS==0, QDEBUG==1 and
QTRACE==1, since this combination was used during system
development. See SIMULA.CTL for files to be assembled. In
the run-time system, only OCSP need be assembled with
QDEBUG==1. Specifically, SA.MAC should not be compiled in a
debug version since the data structures do not permit this
currently. The only UNV file affected by QDEBUG and QTRACE
settings is SIMMAC.UNV. Test and production versions of the
compiler passes can be mixed. All three passes must,
however, contain a test version of the LOWSEG module. If
the QSYS switch is set to zero all modules referencing QSYS
and QSYSDEV must also be reassembled.
If the run time system should be tested it is convenient to
use a version with only one high segment. In SIMLIB you
need only replace the OCSP module by the OCSP0 module.
Alternatively, load OCSP0.REL explicitly and let SIMLIB.REL
be loaded as usual. (No difference on DECsystem-20). The
TOPS-20 version of the compiler is one EXE file and also the
RTS.
If you want to test the run time system when running a
SIMULA program PROG.SIM a still more useful way is to load
the program with the DEBUG command together with the run
time system modules, thus getting access to all local
symbols in the run time system by DDT commands. SIMDEB.CMD
contains a list of all run time modules needed and the
command may be written:
.DEBUG/DDT PROG.SIM,@SIMDEB,SIMLIB/SEARCH
Simpler still:
.DEBUG/DDT PROG.SIM,/REL
REL:SIMHGH,HELPER,DSK:SIMLIB/SEARCH
The last specification can be omitted if no debugging of
SIMLIB is needed.
DECsystem-10/20 SIMULA Implementation Manual Page 20
Chapter 4 MODIFICATIONS TO DEC SYSTEM PROGRAMS
4 MODIFICATIONS TO DEC SYSTEM PROGRAMS
====================================
TOPS-10:
To give SIMULA the status of a standard DECsystem-10
processor, changes have been made in the DECsystem-10
programs COMPIL, LINK-10 and SPRINT-10.
All changes made in the system programs are governed by the
assembly time switch FQZSIM and are thus easy to locate via
the cross reference listing. FILCOM listings can be found
in Appendix A.
Some of the SIMULA changes have been included by DEC in the
standard software releases. LINK-10 version 2B and
following releases are updated.
TOPS-20:
On DECsystem-20, the source code may not be distributed.
The necessary SIMULA changes in EXEC will probably not be
distributed until version 3 of TOPS-20. If you cannot make
or get the changes, the COMPILE and DEBUG commands will not
work for SIMULA, and automatic recompilation is not possible
with the LOAD and EXECUTE commands. LINK-20 recognizes
SIMULA, however, so LOAD and EXECUTE will work as long as no
recompilation is necessary.
4.1 MODIFICATIONS TO COMPIL (OR EXEC)
In TOPS-10, the COMPIL program interprets commands like
COMPILE, EXECUTE, LOAD, DEBUG. This is done in TOPS-20 by
the EXEC process which handles user commands. Corresponding
changes are made in those two programs to allow SIMULA to be
treated like other language processors.
4.1.1 COMPIL changes (TOPS-10)
The following changes have been made:
- The assembly time switch FQZSIM is defined and set to -1.
- The assembly time switch SIMULA is defined and for
installations where the SIMULA compiler should be accepted
it should be set to 1 and for others it should be set to
zero.
- Details about the SIMULA compiler are included in the
PROCESS macro.
- If the SIMULA system is not included the switch SIMSW is
DECsystem-10/20 SIMULA Implementation Manual Page 21
Chapter 4 MODIFICATIONS TO DEC SYSTEM PROGRAMS
defined and set to zero. This is done to always make a
test on SIMSW possible.
- When a SIMULA program appears in a DEBUG command the
string
",SYS:SIMLIB/S/STA:.OCRE0/E/G" will end the command string
to LINK-10. A library search in SIMLIB is done to define
the .OCRE0 entry. The first action when the execution of
the loaded program starts at .OCRE0 is to read SIMDD4.ABS
into core and start SIMDDT execution.
- A minus sign is accepted in processor switches.
E.g. .COMPIL SIMPRO.SIM (-W)
- When the switch /CREF is given the output on the command
file nnnCRF.TMP to the CREF cusp is inhibited, because the
SIMULA compiler will produce its own cross reference
listing.
4.1.2 EXEC changes (TOPS-20)
The changes are made in EXECCS.MAC.
- Define SIMULA in the LANGUAGE macro.
- In PASS2 of the scan, insert the string
",SYS:SIMLIB/SEARCH/STA:.OCRE0" after the specifications
have been processed. This defines the debug entry point
".OCRE0" via SIMLIB.
- Do not output /DEBUG switch to LINK for SIMULA debug.
- If /CREF was specified, do not enter name into CREF file
if SIMULA module. SIMULA has its own CREF.
- Define SIMULA in NAMES macro.
4.2 MODIFICATIONS TO LINK-10 MODULES.
Changes have been made in LNKPAR, LNKLOD and LNKERR. For
LINK version 1B, the LNKLOD change was in LNKWLD.
In LNKPAR:
- The assembly time switch FQZSIM is defined and set to -1.
- SIMULA is defined in the PROCESSORS macro.
- SIMULA is added to the keyword list of the switches
SYSLIBRARY and NOSYSLIBRARY.
In LNKLOD (LNKWLD for version 1B):
- Code is inserted to initiate an automatic library search
in SIMLIB as soon as code generated by the SIMULA compiler
is seen, and to check and give an error message if "SIMULA
main program not loaded."
In LNKERR:
- In the comment part of this module the medium length form
DECsystem-10/20 SIMULA Implementation Manual Page 22
Chapter 4 MODIFICATIONS TO DEC SYSTEM PROGRAMS
of the new error message is inserted. The long form of
the error message is defined and given the contents:
"The user has loaded SIMULA procedures or classes without
a main program. Execution will be terminated because of
missing start address and undefined globals."
4.3 MODIFICATIONS TO SPRINT-10.
The following changes have been made:
- The assembly time switch FQZSIM is defined and set to -1.
- SIMULA is included in the macros CNAMES and LANGS if
FQZSIM is non-zero. This will imply that the $SIMULA card
is accepted as a $LANGUAGE card.
DECsystem-10/20 SIMULA Implementation Manual Page 23
Chapter 5 STORAGE ALLOCATION ALGORITHMS
5 STORAGE ALLOCATION ALGORITHMS
=============================
The data area (pool) allocated dynamically during a SIMULA
program execution will be increased in steps by CORE UUO:s,
and a garbage collection (GC) is done when the pool exceeds
a certain limit. The current version of DECsystem-20 SIMULA
uses the unmodified KI-10 algorithm as described below. We
lack data and resources to change the algorithm at present.
The initial value of the step size is 1P, and the GC limit
is 4P (i.e the first GC is done when a dynamic pool of 4P
has been allocated in steps of 1P). Depending on the
allocation rate and information on the accounting algorithm,
new optimal values for the step size and the GC limit are
computed after each GC.
The allocation will not be done in steps if the assembly
time switch QSASTE in SIMPRM.MAC is set off, and the SA.MAC
module is reassembled. This will probably be the best thing
to do for KA10 installations since frequent CORE requests
will introduce excessive overhead on KA10 systems due to job
shufflings.
The algorithms for computing optimal step size and GC limit
are dependent on the accounting algorithm and may be
modified to suit each individual installation to minimize
the cost of SIMULA program executions. The code is found in
SA.MAC, routine .SANP. The algorithms used are described in
[TD] Chapter III.1.5.3. The distributed system assumes that
the accounted cost is proportional to the CPU-time integral
of
1.1 + 0.005*R*(R+20)/50
where R is the total number of 512-word pages allocated to
the job, and that the CPU-time required for a CORE UUO is 4
ms on a KI10 system.
If your installation has very much core, or if your
installation has an accounting algorithm only dependent on
time, not on core, there may be reason to change these
parameters to make SIMULA use more core and less CPU-time.
On the other hand, if your installation has little core and
the CPU is not heavily loaded, or if accounting depends
entirely on kilo-core-seconds, there may be reason to change
the parameters to make SIMULA use less core and more
CPU-time.
DECsystem-10/20 SIMULA Implementation Manual Page 24
Appendix A. FILCOM LISTINGS
A FILCOM LISTINGS
===============
A.1 COMPIL.MAC
- Code is inserted to initiate an automatic library search in
SIMLIB as soon as code generated by the SIMULA compiler is
seen:
File 1) DSK:COMPIL.MAC created: 2223 25-FEB-1975
File 2) DSK:COMPIL.MAC[10,7] created: 0000 29-AUG-1974
1)1 FQZSIM==-1 ;QZ-MODIFICATIONS
FOR SIMULA *******
1) VCOMPIL==22
****
2)1 VCOMPIL==22
**************
1)1 IFN FQZSIM,<
1) IFNDEF SIMULA,<SIMULA==1>> ;ACCEPT SIMULA
COMPILER
1) IFNDEF DEBSW,<DEBSW==0> ;DEBUGGING AIDS IF
NON-ZERO
****
2)1 IFNDEF DEBSW,<DEBSW==0> ;DEBUGGING AIDS IF
NON-ZERO
**************
1)5 IFN FQZSIM,<
1) IFN SIMULA,<X SIMULA,SIM,SIMULA,,,,=>>
1) >
****
2)5 >
**************
1)6 IFN FQZSIM,<
1) IFE SIMULA,<SIMSW==0>>
1) LOOK==0 ;CHANNEL FOR DOING LOOKUPS FOR
INFORMATION
****
2)6 LOOK==0 ;CHANNEL FOR DOING LOOKUPS FOR
INFORMATION
**************
1)25 IFE FQZSIM,<
1) JRST .+4 ;NO
1) >
1) IFN FQZSIM,<
1) JRST .+6
1) CAMN T2,[',SYS: '] ;SIMULA DEBUG?
1) JRST [PUSHJ P,OUTSIX ;YES OUTPUT
',SYS:SIMLIB/S
1) MOVE T2,['SIMLIB'] ;
DECsystem-10/20 SIMULA Implementation Manual Page 25
Appendix A. FILCOM LISTINGS
/STA:.OCRE0/E'
1) PUSHJ P,OUTSIX ; SIMLIB
MUST BE SEARCHED FIRST
1) MOVE T2,['/S/STA'] ; TO DEFINE
THE START ADDRESS
1) PUSHJ P,OUTSIX ; .OCRE0
WHERE THE FIRST
1) MOVE T2,[':.OCRE'] ; ACTION IS
TO LOAD AND
1) PUSHJ P,OUTSIX ; START
SIMDDT
1) MOVSI T2,'0/E'
1) JRST .+1]
1) >
1) PUSHJ P,OUTSIX ;YES, /E
****
2)25 JRST .+4 ;NO
2) PUSHJ P,OUTSIX ;YES, /E
**************
1)46 IFN FQZSIM,<
1) CAIN C,"-" ;ALLOW MINUS FOR
SWITCHES TO SIMULA
1) JRST PROCS2
1) >
1) CAIN C,"(" ;[221] ALLOW "(" TO
ENCLOSE SWITCH VALUES
****
2)46 CAIN C,"(" ;[221] ALLOW "(" TO
ENCLOSE SWITCH VALUES
**************
DECsystem-10/20 SIMULA Implementation Manual Page 26
Appendix A. FILCOM LISTINGS
File 1) DSK:COMPIL.MAC created: 2223 25-FEB-1975
File 2) DSK:COMPIL.MAC[10,7] created: 0000 29-AUG-1974
1)53 IFE FQZSIM,<
1) TLNN FL2,CBLSW!BLISW ;DON'T WRITE /CREF
IF COBOL OR BLISS (SPECIAL)
1) >
1) IFN FQZSIM,<
1) TLNN FL2,CBLSW!BLISW!SIMSW ;NOT FOR
SIMULA EITHER
1) >
1) PUSHJ P,ENTCRF ;PUT IT IN THE
###CREF FILE
****
2)53 TLNN FL2,CBLSW!BLISW ;DON'T WRITE /CREF
IF COBOL OR BLISS (SPECIAL)
2) PUSHJ P,ENTCRF ;PUT IT IN THE
###CREF FILE
**************
1)55 IFN FQZSIM,<
1) CAIN T2,^L<SIMSW>-22 ;SIMULA DEBUG?
1) JRST [POP P,T2 ;JUNK
1) MOVE T2,[',SYS: '] ;INDICATE
SIMULA DEBUG WITH
1) MOVEM T2,EXECFL ;,SYS: IN
EXECFL
1) JRST NODDT]
1) >
1) GETDD1: TRNE FL,LINKFL ;IF LINK-10
****
2)55 GETDD1: TRNE FL,LINKFL ;IF LINK-10
**************
DECsystem-10/20 SIMULA Implementation Manual Page 27
Appendix A. FILCOM LISTINGS
A.1.1 CHANGES IN EXECCS.MAC (TOPS-20)
Only changed text is listed here
(additions only, there are no replacements).
File 1) DSK:EXECCS.MAC created: 1711 16-JUNE-1976
File 2) DSK:E.MAC created: 1418 18-MAR-1977
2)4 L (SIMULA,SIM,SIMULA,SIM)
2) >
****
2)8 TXNE P1,F%SDDT ;DEBUG?
2) CALL SIMDEB ;Must handle SIMULA
debug after spec output
2) HRROI B,[ASCIZ "/EXE"] ;ASSUME EXECUTE
****
2)9 SETDEB: MOVE B,DEBAID ;SIMULA waits till
after
2) CAIN B,LT.SIM ;output of
2) RET ;specif. list
2) HRROI B,[ASCIZ "/DEBUG"]
2) CALL TSOUT0
****
2)9 ;Routine to output DEBUG command string to LINK for
SIMULA
2) SIMDEB: SKIPE B,DEBAID ;Debugging aid
requested?
2) CAIE B.LT.SIM ;Yes, SIMULA?
2) RET ;NO
2)10 ;LSCAN - ROUTINE TO CRAWL THROUGH LIST OF FILE SPECS
****
2)13 CAIN P4,LT.SIM ;Not for SIMULA
either
2) JRST BLDCM3
2) CALL ENTCRF ;ENTER NAME IN CREF
FILE
****
2)50 NM (SIMULA,S%LTYP,LT.SIM)
2) NM (SNOBOL,S%LTYP,LT.SNO)
****
DECsystem-10/20 SIMULA Implementation Manual Page 28
Appendix A. FILCOM LISTINGS
A.2 LNKPAR.MAC
File 1) DSKB:LNKPAR.MAC created: 1647 27-FEB-1975
File 2) DSKD:LNKPAR.MAC created: 1417 13-JULY-1974
1)2 FQZSIM==-1 ;ACCEPT SIMULA COMPILER
1) IFN FQZSIM,<
1) X SIMULA,SIM
1) >
1) ND FTOVERLAY,1 ;1= OVERLAY MODULE REQUIRED
****
2)2 ND FTOVERLAY,1 ;1= OVERLAY MODULE REQUIRED
**************
1)28 IFE FQZSIM,<
1) KEYMAC LIB,<ANY,F40,COBOL,ALGOL,NELIAC,PL1,BLISS,SAI
L,FORTRAN,MACRO,FAIL,BCPL,MIDAS>
1) >
1) IFN FQZSIM,<
1) KEYMAC LIB,<ANY,F40,COBOL,ALGOL,NELIAC,PL1,BLISS,SAI
L,FORTRAN,MACRO,FAIL,BCPL,MIDAS,SIMULA>
1) >
1) KEYMAC MAP,<END,NOW,ERROR,INCREMENTAL>
****
2)28 KEYMAC LIB,<ANY,F40,COBOL,ALGOL,NELIAC,PL1,BLISS,SAI
L,FORTRAN,MACRO,FAIL,BCPL,MIDAS>
2) KEYMAC MAP,<END,NOW,ERROR,INCREMENTAL>
**************
DECsystem-10/20 SIMULA Implementation Manual Page 29
Appendix A. FILCOM LISTINGS
A.3 LNKERR.MAC
File 1) DSKB:LNKERR.MAC created: 1648 27-FEB-1975
File 2) DSKD:LNKERR.MAC created: 2240 08-JULY-1974
1)7 IFN FQZSIM,<
1) SMP %W %W SIMULA main program not loaded
1) >
1) SNC %F %F Symbol [symbol] already defined, but
not as common
****
2)7 SNC %F %F Symbol [symbol] already defined, but
not as common
**************
1)8 IFN FQZSIM,<
1) HASH SMP,0,<^_
1) The user has loaded SIMULA procedures or
classes without a
1) main program. Execution will be
terminated because of
1) missing start address and undefined
symbols.>
1) >
1) HASH SNC,0,<^_
****
2)8 HASH SNC,0,<^_
**************
DECsystem-10/20 SIMULA Implementation Manual Page 30
Appendix A. FILCOM LISTINGS
A.4 LNKLOD.MAC
File 1) DSKB:LNKLOD.MAC created: 1648 27-FEB-1975
File 2) DSKD:LNKLOD.MAC created: 1804 12-JULY-1974
1)63 IFN FQZSIM,<
1) SIM.L1: SKIPE LODNAM ;MAIN PROGRAM SEEN
YET?
1) JRST SIM.L0 ;YES
1) .ERR. (MS,,V%L,L%W,S%W,SMP,<SIMULA main
program not loaded>)
1) SIM.L0: MOVE P1,['SIMLIB']
1) PJRST LOAD1
1) >
1) QREENT: SKIPE T1,OTSEG ;HAS USER DECIDED
WHICH WAY TO LOAD?
****
2)63 QREENT: SKIPE T1,OTSEG ;HAS USER DECIDED
WHICH WAY TO LOAD?
**************
DECsystem-10/20 SIMULA Implementation Manual Page 31
Appendix A. FILCOM LISTINGS
A.5 SPRINT.MAC
File 1) DSK:SPRINT.MAC created: 2229 25-FEB-1975
File 2) DSK:SPRINT.MAC[10,6] created: 1258 29-SEPT-1974
1)7 IFNDEF FQZSIM,<FQZSIM==-1>
1) ;If FQZSIM is non-zero, the $SIMULA card will be
1) ; accepted as a language card
1)8 SUBTTL Conditional Assembly Parameters
****
2)8 SUBTTL Conditional Assembly Parameters
**************
1)79 IFN FQZSIM,<
1) X SIMULA,$SIMULA,CD.LAN,
1) >
1) >
****
2)79 >
**************
1)83 IFN FQZSIM,<
1) L $SIMULA,SIM,SIM,R
1) >
1) >
****
2)83 >
**************