Page Numbers: Yes First Page: 1 X: 527 Y: 10.5"
Margins: Binding: 13
Odd Heading: Not-on-first-page
Getting started
Even Heading:
Getting started
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 MesaDisk.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 18, Executive 11, using erase option, before executing the command file; this should leave your disk with about 4000 free pages (for a single model 31 disk). If you just wish to get a new Mesa system on an already initialized disk, obtain the command file Mesa.cm. Mesa 6.0 requires Alto Operating System version 18, Executive 11 (or newer versions) for proper operation.
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.bcd, the binder, (5) XDebug.image, the debugger, (6) MesaFont.strike, and (7) the system definitions files. Note that you need approximately 1800 pages for all of the Mesa files plus about 700 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 system, 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.
The debugger is installed by typing XDebug to the Alto Executive. This saves the debugger’s core image on the file MesaDebugger and exits to the Alto Executive. You must have a strike font on the disk, either MesaFont.strike or SysFont.strike. These can be obtained from your favorite source of Alto fonts; there is a version of Gacha8, called MesaFont.strike on the release directory. If you want to load some of your own programs into the debugger, see Appendix E.
1.3. Preparing your source file
The Mesa compiler accepts both unformatted ASCII and formatted Bravo text files. The debugger uses source files for setting and displaying breakpoints. Since the debbugger ignores Bravo trailers, you are advised to indent programs with tabs and spaces. If the source files on your Alto disk are not consistent with the object files, you will be restricted in your use of the debugger.
1.4. Compiling your program
The compiler allows several options on the command line to control what is being compiled, and what interfaces are used; see the compiler section of this document for details. In the simplest case, type Compiler source1 source2 . . . directly to the Alto Executive, making use of its filename completer if you wish. The compiler assumes a ".mesa" filename extension if one is not supplied, and produces object files with an extension of ".bcd". Compiled versions of all DEFINITIONS modules that your program uses must be on your disk.
If a syntax error occurs, the compiler attempts to recover by deleting and/or inserting text (not in the file), logs 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: procedure[character-position]) 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 sourcename.errlog. When compiled successfully, the resulting object file is found on sourcename.bcd. If the compilation is not successful, any existing file named sourcename.bcd is deleted.
1.5. Binding your configuration
The binder is available in ".bcd" form, so the file Mesa.image is needed on the disk in order to run it. The binder command syntax is similar to that of the compiler. In the simple case, type Binder source1 source2 . . . directly to the Alto Executive, making use of its filename completer if you wish. The binder assumes a ".config" filename extension if one is not supplied, and produces a object files with an extension of ".bcd".
Compiled versions of all modules in your configuration 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 sourcename.errlog. When successfully bound, your sourcename.bcd file is ready to run. The binder puts a summary of the commands it processes on the file Binder.log.
1.6. Running your program
Type Mesa sourcename to the Alto Executive and your program will be loaded into Mesa.image and started. The process of loading your program includes binding your program’s imports to the various interfaces exported by the system. At this point, you are well advised to browse through the Mesa System Documentation for complete details on what you can do. There is also a conversational interface to the loader available as MesaExec.bcd. See Appendix D for details. Typing sourcename to the Alto Executive is the same as typing Mesa sourcename.bcd. See the Alto Executive documentation and Appendix D for more details.
1.7. Debugging your program
In order to set 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 append the switch "/d" to your sourcename on the command line; this brings you into the debugger just before your program is started. If you wish to enter the debugger at any time (i.e., while your program is running), Control-Swat 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 via the Adobe action request system, using the Core Software option of ARSubmit.