.\" .\" UCSD p-System Operating System .\" Copyright (C) 2011 Peter Miller .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions are met: .\" .\" * Redistributions of source code must retain the above copyright notice, .\" this list of conditions and the following disclaimer. .\" * Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" * Neither the name of the ucsd-psystem-os project nor the names of its .\" contributors may be used to endorse or promote products derived from .\" this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .ad l .hy 0 .so version.so .nf ucsd-psystem-os \*(v) Howto

ucsd-psystem-os \*(v)
How To Use It

This page explains how to get your shiny new UCSD Pascal system working.

Software

You need to get copies of the following software and then you need to build and install each of them, in that order.

Alternatively, if you are using Ubuntu Linux, you can get pre-built packages from LaunchPad, using a PPA:

sudo add-apt-repository ppa:pmiller-opensource/ppa
sudo apt-get update
and then you simply install them as usual:
sudo apt-get install ucsd-psystem-xc ucsd-psystem-fs ucsd-psystem-vm

Build the UCSD Pascal operating System

See the building web page.

Alternatively, you can download pre-built disk images from this web site:

using these commands:
wget http://miller.emu.id.au/pmiller/ucsd-psystem-os/disk-image/system.vol
wget http://miller.emu.id.au/pmiller/ucsd-psystem-os/disk-image/utility.vol

Work Area

We are going to use a simple work area for the rest of this demonstration. Change directory into your new work area.
mkdir work
cd work
In this work area, create a file called “hello.text” (note the four-letter file extension) with the following contents:
program hello;
begin
  writeln('Hellow, World!')
end.

Cross Compiler

You can compile the program using the cross compiler:
ucsdpsys_compile hello.text
To execute it, start the virtual machine, and automagically turn the current directory into a disk image:
ucsdpsys -w . -f ../system.vol -N
You will now see the familiar UCSD Pascal prompt:
Command: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem, D(ebug,? [II.0]

Welcome  SYSTEM,  to

U.C.S.D.  Pascal  System  II.0
http://miller.emu.id.au/pmiller/ucsd-psystem-os/ version \*(V)

Current date is  26-Jan-11
we then have to change director into the WORK disk, because it has been build to contain the files in the current directory:
F P WORK: return Q
Now you can run the cross compiled program like so:
X HELLO return
And you will see the display:
Command: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem, D(ebug,? [II.0]
Hello, World!

Native Compiler

Alternatively, use the UCSD native compiler:
C HELLO return
HELLO return
and execute it the same way as you executed the cross compiled version.

Get Me Out Of Here

To quit the system, use H for halt.

You will notice that the current directory has been updated with the changes made to the WORK: volume while it was being used (that's what the “ucsdpsys \-w .” option was for).