Text preview for : Mesa_Users_Handbook_Version_4.0_Jun78.pdf part of xerox Mesa Users Handbook Version 4.0 Jun78 xerox mesa 4.0_1978 Mesa_4_Documentation Mesa_Users_Handbook_Version_4.0_Jun78.pdf
Back to : Mesa_Users_Handbook_Versi | Home
Mesa User's Handbook
Version 4.0
June 1978
This handbook contains documentation for using all of the standard Mesa services intended
for Mesa programmers as well as operational procedures for the Alto. In general, the
sections are short and to the point, serving as a how-to guide rather than a reference
document containing all of the details. This handbook assumes prior familiarity with the
Mesa language as well as the Alto.
XEROX
SYSTEMS DEVELOPMENT DEPARTMENT
3408 Hillview Avenue / Palo Alto / California 94104
This document is for internal Xerox use only.
Table of Contents
Preface 1
1. Getting started
1.1. Setting up the disk 2
1.2. Il\stalling the debugger 2
1.3. Preparing the source file 3
1.4. Compiling your program 3
1.5. Binding your configuration 3
1.6. Running your program 3
1.7. Debugging your program 4
1.8. Reporting problems 4
2. Directories 5
3. Resources 6
Appendices
A. Compiler 8
B. Binder 15
C. System 20
D. Debugger 22
E. Utilities 27
Preface
June 1978
This handbook contains documentation for using all of the standard Mesa services intended for
Mesa programmers as well as operational procedures for the Alto. In general, the sections are
short and to the point, serving as a how-to guide rather than a reference document containing all
of the details. This handbook assumes prior familiarity with the Mesa language as well as the
Alto. All suggestions as to the form, correctness, and understandability of this document should
be sent to your support group.
This documentation is divided into 4 parts. Section 1 tells you the basics needed to get started,
section 2 lists the directories that are of interest to Mesa users, section 3 lists various resources
you should be aware of, and appendices A through E give further details on the compiler, binder,
system, debugger, and utilities.
The style of this handbook is similar to that used in the Mesa Language Manual. All fine
points are in this font, any word or phrase which needs to be stressed is italicized, US6r
input/debugger output is in th i s fon t, file names are IN THIS FONT, and references to other
documents are in this font.
2
Section 1: Getting Started
This section tells you all that you need to know for getting started and running a Mesa program.
See the appendices for further details on the various subsystems and a sample debugging session.
1.1. Setting up your Alto disk
If you are setting up an Alto disk from scratch, either copy the standard Mesa disk maintained
by your support group or obtain the command file NEWMESADISK.CM, which transfers the basic
runtime files, as well as Bravo (and a Mesa USER.CM file), to your Alto disk. You also need to install
the Alto Operating System Version 15/5, Executive 8, using erase option, before executing the command file; this
should leave your disk with about 4000 free pages. If you just wish to get a new Mesa system on an
already initialized disk, obtain the command file MESA.CM.
In either case, the basic Mesa runtime files that are transferred are: (1) RUNMESA.RUN, a BCPL
program which loads the ram with the Mesa emulator, loads main memory with the kernel Mesa
system, and starts execution, (2) MESA.IMAGE, the Mesa system, (3) COMPILER.IMAGE, the compiler,
and (4) BINDER.IMAGE, the binder (5) XDEBUG.IMAGE, the debugger, (6) WINDEX.BCD, the window
manager for (optional) use with the debugger, and (7) the system definitions files. Note that you
need approximately 1400 pages for all of the Mesa files plus about 850 pages for Bravo and related files. These
command files also install the debugger (and Bravo).
If the file MESAFONT.AL exists, Mesa will use it for the system display; otherwise SYSFONT.AL is
used.
1.2. Installing the debugger
In order to establish the communication link between the debugger and the Mesa Executive, you
must install the debugger. This installation is similar to installing the Swat debugger, for those familiar with
that operation. Make sure your Alto disk contains the debugger, XDEBUG.IMAGE, and the window
manager for (optional) use with the debugger, WINDEX.BCD.
The I nsta 11 command may be invoked from the Alto Executive by typing XDebug Wi ndex/LI,
which loads the window manager (with code links) and installs the debugger. Alternatively, you may
type XDebug to the Alto Executive, which leaves you talking to the debugger nub whose prompt
character is "/". If you would like to include the window manager in the debugger, execute a
New - Start sequence on the file WINDEX.BCD. If you want to load some of your own programs into the
debugger, see the Mesa Debugger Documentation for more complete details on how this is done. When you are
satisfied with the status of your debugger, issue the Ins ta 11 command; this sav.es the current
core image of the debugger and exits to the Alto Executive.
Getting started 3
1.3. Preparing your source file
Mesa accepts both unformatted ASCII and formatted Bravo source text files. Since the debugger
uses source files to print source-text descriptions of the locus of the pc in frames and for setting
breakpoints, be sure that the source files on your Alto disk are consistent with the object files.
1.4. Compiling your program
Type Comp i 1 e r to the Alto Executive to invoke the compiler. It prompts for the source file
name; when it finishes, it prompts again; a null filename (CR) returns you to the Alto Executive.
Alternately, you may type Compiler sourcel source2 . . . directly to the Alto Executive,
making use of its filename completer if you wish. The compiler assumes a ". mes a" filename
extension if it is not supplied. Compiled versions of all DEFINITIONS modules that your program
uses must be on your disk.
If a syntactic error occurs, the compiler attempts to recover by deleting and/or inserting text (not
in the file), displays the change(s), and tries to plow on. Semantic errors result in a symbolic
print-out of the location of the error (in the form: proeedure[eharacter-positionJ) and an
indication of the type of error. The semantic passes try very hard to muddle through with a
complete diagnosis. The compiler puts all error messages in the file sou r c e name. er r log.
When compiled successfully, the resulting object file is found on sourcename. bed.
1.5. Binding your configuration
Typing Binder to the Alto Executive invokes the binder. It prompts for the source file name;
when it finishes, it prompts again; a null filename (CR) returns you to the Alto Executive.
Alternately, you may type Bi nder soureel souree2 ... directly to the Alto Executive, making
use of its filename completer if you wish. The binder assumes a ". confi g" filename extension
if it is not supplied.
Compiled versions of all modules in your configuratfon must be on your disk. The binder goes
through your configuration description, sourcename.config, and attempts to bind the
IMPORTS/EXPORTS. All error messages are put in the MESA, TYPESCRIPT file. When successfully
bound, your soureename. bed file is ready to run.
1.6. Running your program
Type Mes a to the Alto Executive and you will find yourself talking to the Mesa Executive. At
system start-up the Mesa Executive is given control in a context from which all the various
system utilities are visible. At this point, you are well advised to browse through the Mesa
System Documentation for complete details on what you can do, Basically, you must: (1) load
your program -- New command, and (2) execute its initialization code and start execution --
Start command. If this fails, try putting in some breakpoints or enabling some tracing before
executing step (2).
Getting started 4
1.7. Debugging your program
In order to set some breakpoints in your program, trace program execution, display the runtime
state, or interpret simple Mesa statements, you must first invoke the Mesa debugger. There are
several ways of doing this. The straightforward method is to issue the Debug command to the
Mesa Executive; this brings you into the debugger, ready to execute a command. If you wish to
enter the debugger at any time (Le., while your program is running), tSWAT interrupts your
program. Once you are inside the debugger, typing "?" to the command processor gives you a list
of the valid commands. The Mesa Debugger Documentation contains details on other ways of
entering the debugger and complete documentation on all the available commands.
1.8. Reporting problems
Any requests or problems with the Mesa system should be sent to . Bug reports and
messages that cannot be answered immediately are assigned a number and a state (open, closed.
rejected. or superseded) and filed in CR.LOG. Whenever a change request is moved
from one state to another. the originator is notified. Information about any request can always
be found in the log.
5
Section 2: Directories
These directories are maintained on [IRIS]. Users without access to [IRIS] should consult their
support group to find another host.
Contains the new version of the Mesa system during the alpha test period. When the
system is ready to be released, the contents of the (MESA) directory moves (temporarily)
to (OLDMESA> and the contents of moves to .
Contains the IMAGE files of interest to users of the Mesa system. It contains MESA-IMAGE
(the Alto/Mesa system), COMPILER.lMAGE (compiler), BINDER.IMAGE (binder), XDEBUG.IMAGE
(debugger), WINDEX.BCD (window manager for optional use with the debugger), and
RUNMESA.RUN (Alto/Bcpl program which "boots" the Mesa system on the Alto).
Contains the source and object files for the system definitions and program modules.
Several packages constructed from standard Mesa system modules are also stored here.
(MESA>COMPILER)
(MESA>BINDER>
XDEBUG)
LlSTER>
(MESA>UTILITIES>
Contains the source and object files for the the compiler, binder, and debugger, lister, and
utility programs respectively.
(MESA)DOC>
Contains the documentation for the Mesa system. Both .BRAVO and .PRESS versions are
maintained here.
An informal directory containing packages and independent subsystems along with
corresponding documentaion. The file SUMMARY.PRESS contains a list of these packages
and a short description of each.
[MAXC]
Contains CR.LOG, the log of change requests for the Mesa system (as explained in Section
1.8). Any problems with the Mesa system should be reported to .
6
Section 3: Resources
The following list enumerates resources that may be of interest to Mesa programmers.
Documents
Mesa Language Manual
Complete reference on the language, syntax, and use.
Elements of Mesa Style
Describes some of the novel features of Mesa using a number of examples oriented
towards the systems programmer. It concentrates on compile-time checking, interfaces,
and modularity.
Early Experience with Mesa
Discusses issues involved in using Mesa for systems programming (written by the
designers of Mesa). It is recommended for those interested in the philosophy behind the
language (not for the beginner).
Mesa System Documentation
Describes configurations of the Mesa system software and components which comprise
them.
OIS Mesa Functional Specification
Describes the implementation of the runtime support necessary to execute Mesa programs.
It assumes a Dstar machine, rather than an Alto, and is quite detailed.
OIS Processor Principles of Operation
Describes the interior architecture of the OIS System Element Digital Processor. It
includes a description of the virtual storage system, the instruction set, and the input-
output facilities.
Mesa Debugger Documentation
Describes the current release of the Mesa debugger.
Debugger - Extended Features
Describes some extended features of the Mesa debugger: FTP command, user invoked
procedures, and the window inanager (WINDEX).
Resources 7
Files
(MESA)MESA.signals
(MESA)BASICMESA.signals
(MESA)BINDER.signals
(MESA)COMPILER.signals
(MESA)XDEBUG.signals
Lists the uncaught signal names (and global frame addresses) for various Mesa
components.
(MESA)USER.CM
A USER.CM file set up with the Mesa Bravo macros, GACHA10 for the editing font, and
minimal printing fonts.
(MESA)NEWMESADISK.CM
(MESA)MESA.CM
The command files used for setting up a basic Mesa disk (as described in section 1.1).
[MAXC 1] (SECRETARY)MESAUSERS.dl
Distribution list for messages to the Mesa user community. If you wish to get on this list,
talk to your secretary.
Other materials
There have been a series of videotapes prepared which describe various features of the language
and runtime environment. See a member of your support group for further details on the tapes
that are currently available and where to get them.
8
Appendix A: Compiler
The Mesa compiler translates Mesa source files into corresponding object files. An object file
contains the executable code for the module (if any) plus a binary configuration description (for
use by the binder or loader) and a symbol table (for inclusion by other programs or for use by
the debugger). By convention, an object file has a name with extension ". BCD".
The Mesa Language Manual describes the syntax and semantics of the Mesa source language.
This appendix describes the operation of the compiler, including the compile-time options and
messages.
Preparing Source Files
The compiler accepts ASCII text files. In a source file, any sequence of characters that begins
with a tZ is skipped up to (but excluding) the next carriage return (or end of file). This
convention accomodates Bravo formatting codes. You may use such formatting in your source
files as you see fit. Note, however, that Mesa does not interpret any information about fonts,
position, etc., attached to source text that it displays (in, e.g., identifying the location of an error
or breakpoint).
The recommended extension for naming any Mesa source file is ". Mesa".
Standard Bravo macros useful during the editing and compilation cycle are described later.
Running the Compiler
The compiler takes commands either from the command line or interactively from the keyboard.
To enter interactive mode, type just "comp i 1 er" to the Alto Executive. The compiler
will prompt you for commands. You can correct a command during typein by using the
usual set of editing characters. To exit from the compiler, respond to the prompt with
just a carriage return.
To invoke the compiler specifying command line input, follow "camp i 1e rIO with a list of
commands, separated by spaces. In this mode, you can use the Executive's file completion
facilities to build the command list, and all input is taken from the command line.
The simplest form of command is just the name of a source file to be compiled. If you supply
the command sourcef i1 e with no period and no extension, the compiler assumes you mean
sourcefi 1 e .Mesa.
During compilation, the display is turned off and a die is displayed in the cursor. The number
on the die identifies the pass of the compiler that is running. This allows you to check the
progress of the compilation and also provides useful feedback to the maintainers of the compiler
when something goes drastically wrong.
Compiler 9
Fine point:
Don't confuse the compiler's display with DMT's.
The compiler reports the result of each command with a message having one of the following
forms (each * is replaced by an appropriate number; bracketed items appear only when relevant):
file. mesa -- source chars: *, time: *
[code bytes: *, links: *, frame size: *]
[* warnings on file.errlog]
Compi~ation was successful. The object file is file.BCD. For a DEFINITIONS module, the
middle line is not meaningful and is omitted. Otherwise, "1 inks" is the number of items
imported by the module, and "frame size" is the size of the global frame (in words),