.\" .\" 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
Alternatively, if you are using Ubuntu Linux, you can get pre-built packages from LaunchPad, using a PPA:
and then you simply install them as usual:sudo add-apt-repository ppa:pmiller-opensource/ppa sudo apt-get update
sudo apt-get install ucsd-psystem-xc ucsd-psystem-fs ucsd-psystem-vm
Alternatively, you can download pre-built disk images from this web site:
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
In this work area, create a file called “hello.text” (note the four-letter file extension) with the following contents:mkdir work cd work
program hello; begin writeln('Hellow, World!') end.
To execute it, start the virtual machine, and automagically turn the current directory into a disk image:ucsdpsys_compile hello.text
You will now see the familiar UCSD Pascal prompt:ucsdpsys -w . -f ../system.vol -N
we then have to change director into the WORK disk, because it has been build to contain the files in the current directory: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
F P WORK: return QNow you can run the cross compiled program like so:
X HELLO returnAnd 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!
C HELLO returnand execute it the same way as you executed the cross compiled version.
HELLO return
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).