├── .gitignore ├── BUILDING ├── LICENSE ├── LICENSE-UCSD ├── README ├── arch ├── 00readme.txt ├── pdp11 │ ├── assembler │ │ ├── asm1.text │ │ ├── asm2.text │ │ ├── asm3.text │ │ ├── asm4.text │ │ ├── asm5.text │ │ ├── asm6.text │ │ ├── main.text │ │ └── module.cook │ ├── interpreter │ │ ├── 00readme.txt │ │ ├── dl.inc.text │ │ ├── iotrap.inc.text │ │ ├── lp.inc.text │ │ ├── macros.inc.text │ │ ├── main.asm.text │ │ ├── mainop.inc.text │ │ ├── procop.inc.text │ │ ├── qx.inc.text │ │ ├── rk.inc.text │ │ ├── rx.inc.text │ │ └── tk.inc.text │ ├── qxboot │ │ └── main.asm.text │ ├── rkboot │ │ └── main.asm.text │ └── rxboot │ │ └── main.asm.text └── z80 │ ├── assembler │ ├── asm1.text │ ├── asm2.text │ ├── asm3.text │ ├── asm4.text │ ├── asm5.text │ ├── asm6.text │ ├── error-messages.text │ ├── extra.z80.text │ ├── main.text │ └── opcode-data.text │ └── interpreter │ ├── arith.inc.text │ ├── boot.inc.text │ ├── cpmio.inc.text │ ├── fpi.inc.text │ ├── fpl.inc.text │ ├── fpt.inc.text │ ├── interp.inc.text │ ├── main.asm.text │ ├── nofpi.inc.text │ ├── nofpt.inc.text │ ├── proc1.inc.text │ ├── proc2.inc.text │ ├── set1.inc.text │ ├── set2.inc.text │ ├── stp.inc.text │ └── vars.inc.text ├── basic ├── main.text └── meson.build ├── basicio └── main.txt ├── binder ├── main.text └── meson.build ├── bios.diag ├── b.diag.dsk.text ├── b.diag.int.text ├── b.diag.rsp.text ├── b.diag.ser.text ├── main.text └── meson.build ├── calc ├── main.text └── meson.build ├── charset ├── bit-map-font.text └── module.cook ├── compiler ├── block.text ├── bodypart.a.text ├── bodypart.b.text ├── bodypart.c.text ├── bodypart.d.text ├── bodypart.e.text ├── compglbls.text ├── compinit.text ├── decpart.a.text ├── decpart.b.text ├── decpart.c.text ├── error-messages.text ├── main.text ├── meson.build ├── module.cook ├── procs.a.text ├── procs.b.text └── unitpart.text ├── copydupdir ├── main.text └── meson.build ├── cross └── klebsch-stage1.ini ├── diagnostic ├── diag0.text ├── diag1.text ├── diag2.text ├── diag3.text ├── diag4.text ├── diag5.text ├── diag6.text ├── main.text └── meson.build ├── disassembler ├── disasm1.text ├── disasm2.text ├── main.text ├── meson.build ├── module.cook └── opcodes.ii.0.txt ├── editor ├── command.text ├── copyfile.text ├── environ.text ├── find.text ├── head.text ├── init.text ├── insertit.text ├── main.text ├── meson.build ├── misc.text ├── module.cook ├── moveit.text ├── out.text ├── putsyntax.text ├── user.text └── util.text ├── edittort11 ├── main.text └── meson.build ├── etc ├── BUILDING.man ├── Howto.conf.in ├── Howto.cook ├── README.man ├── arch-from-host.sh ├── autoconf.cook ├── change_log.man ├── check-tarball.sh ├── documentation.cook ├── host-disk-kb.sh ├── logo.so ├── metrics.cook ├── mkfsdisk.py ├── new.1.0.so ├── new.1.1.so ├── new.1.2.so ├── new.1.3.so ├── new.sh ├── new.so ├── page-list.awk ├── ppa-upload.sh ├── ref-index.so ├── ref-parts.so ├── ref-ptx.ignore ├── ref-ptx.sh ├── ref-ptx1.awk ├── ref-ptx2.awk ├── ref-toc.so ├── reference.man ├── stage1.cook ├── tags.cook ├── ucsdpsys-wrapper.sh ├── version.so ├── vstamp.asm.text └── vstamp.inc.text ├── execerr ├── main.text └── meson.build ├── filer ├── filer.a.text ├── filer.b.text ├── filer.c.text ├── filer.d.text ├── filer.e.text ├── filer.vars.text ├── main.text ├── meson.build └── module.cook ├── host ├── 00readme.txt └── klebsch │ ├── long_integer │ ├── main.asm.text │ └── meson.build │ ├── meson.build │ ├── miscinfo.text │ ├── transcendental │ ├── main.asm.text │ └── meson.build │ └── turtle_graphics │ ├── main.asm.text │ └── meson.build ├── libmap ├── main.text └── meson.build ├── librarian ├── main.text ├── meson.build └── module.cook ├── linker ├── link0.text ├── link1.text ├── link2.text ├── link3a.text ├── link3b.text ├── main.text ├── meson.build └── module.cook ├── long_integer ├── decop.a.text ├── decop.b.text ├── drwstuff.text ├── globals.text ├── main.text └── meson.build ├── man ├── man1 │ ├── ucsdpsys_os_license_bsd.1 │ └── ucsdpsys_os_license_ucsd.1 └── meson.build ├── markdupdir ├── main.text └── meson.build ├── meson.build ├── meson_options.txt ├── pascalio ├── main.text ├── meson.build ├── module.cook └── unit.text ├── radix ├── main.text └── meson.build ├── rt11toedit ├── main.text └── meson.build ├── setup ├── main.text └── meson.build ├── system ├── globals.text ├── main.text ├── meson.build ├── module.cook ├── syssegs.a.text ├── syssegs.b.text ├── system.a.text ├── system.b.text └── system.c.text ├── transcendental ├── main.text └── meson.build ├── turtle_graphics ├── main.text └── meson.build ├── ucsdpsys_os_license_bsd.1 ├── web ├── building.html ├── download.html ├── howto.html ├── icon.png.uue ├── index.html └── module.cook ├── xref ├── main.text └── meson.build └── yaloe ├── main.text ├── meson.build └── module.cook /.gitignore: -------------------------------------------------------------------------------- 1 | /Makefile 2 | /config.log 3 | /config.status 4 | /stage1/ 5 | 6 | /compiler/vstamp.inc.text 7 | /filer/globals.text 8 | /pascalio/globals.text 9 | /system/vstamp.inc.text 10 | /yaloe/globals.text 11 | 12 | /build/ 13 | 14 | # Eclipse 15 | .project 16 | .cproject 17 | 18 | /bin/ 19 | 20 | # Autotools 21 | Makefile 22 | config.log 23 | config.status 24 | lib/config.h 25 | 26 | 27 | # Prerequisites 28 | *.d 29 | 30 | # Object files 31 | *.o 32 | *.ko 33 | *.obj 34 | *.elf 35 | 36 | # Linker output 37 | *.ilk 38 | *.map 39 | *.exp 40 | 41 | # Precompiled Headers 42 | *.gch 43 | *.pch 44 | 45 | # Libraries 46 | *.lib 47 | *.a 48 | *.la 49 | *.lo 50 | 51 | # Shared objects (inc. Windows DLLs) 52 | *.dll 53 | *.so 54 | *.so.* 55 | *.dylib 56 | 57 | # Executables 58 | *.exe 59 | *.out 60 | *.app 61 | *.i*86 62 | *.x86_64 63 | *.hex 64 | 65 | # Debug files 66 | *.dSYM/ 67 | *.su 68 | *.idb 69 | *.pdb 70 | 71 | # Kernel Module Compile Results 72 | *.mod* 73 | *.cmd 74 | .tmp_versions/ 75 | modules.order 76 | Module.symvers 77 | Mkfile.old 78 | dkms.conf 79 | 80 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | License() License() 2 | 3 | 4 | 5 | LLIICCEENNSSEE 6 | Redistribution and use in source and binary forms, with or without mod- 7 | ification, are permitted provided that the following conditions are 8 | met: 9 | 10 | +o Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | +o Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | +o Neither the name of the ucsd-psystem-os project nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 22 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 23 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTIC- 24 | ULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 25 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 28 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 29 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 30 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 31 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | 33 | 34 | 35 | License() 36 | -------------------------------------------------------------------------------- /LICENSE-UCSD: -------------------------------------------------------------------------------- 1 | UCSD License(2.0) Regents of the University of California UCSD License(2.0) 2 | 3 | 4 | 5 | UUCCSSDD LLIICCEENNSSEE 6 | UCSD PASCAL - Version II.0 7 | Copyright (C) 1979 Regents of the University of California 8 | All Rights Reserved 9 | 10 | Permission to use, copy, modify and distribute any part of this UCSD 11 | PASCAL for educational, research and non-profit purposes, without fee, 12 | and without a written agreement is hereby granted, provided that the 13 | above copyright notice, this paragraph and the following three para- 14 | graphs appear in all copies. 15 | 16 | Those desiring to incorporate UCSD PASCAL into commercial products or 17 | use for commercial purposes should contact the Technology Transfer & 18 | Intellectual Property Services, University of California, San Diego, 19 | 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 20 | Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 21 | 22 | IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 23 | FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 24 | INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 25 | THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 26 | SUCH DAMAGE. 27 | 28 | THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 29 | OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 30 | UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 31 | MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, EITHER 32 | IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR- 33 | RANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR THAT 34 | THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR OTHER 35 | RIGHTS. 36 | 37 | RREEFFEERREENNCCEE 38 | Case Number: SD1991-807 (2006) 39 | http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 40 | 41 | 42 | 43 | UCSD License(1.5) Regents of the University of California UCSD License(1.5) 44 | 45 | 46 | 47 | UUCCSSDD LLIICCEENNSSEE 48 | UCSD PASCAL - Version I.5 49 | Copyright (C) 1978 Regents of the University of California 50 | All Rights Reserved 51 | 52 | Permission to use, copy, modify and distribute any part of this UCSD 53 | PASCAL for educational, research and non-profit purposes, without fee, 54 | and without a written agreement is hereby granted, provided that the 55 | above copyright notice, this paragraph and the following three para- 56 | graphs appear in all copies. 57 | 58 | Those desiring to incorporate UCSD PASCAL into commercial products or 59 | use for commercial purposes should contact the Technology Transfer & 60 | Intellectual Property Services, University of California, San Diego, 61 | 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 62 | Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 63 | 64 | IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 65 | FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 66 | INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 67 | THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 68 | SUCH DAMAGE. 69 | 70 | THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 71 | OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 72 | UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 73 | MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, EITHER 74 | IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR- 75 | RANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR THAT 76 | THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR OTHER 77 | RIGHTS. 78 | 79 | RREEFFEERREENNCCEE 80 | Case Number: SD1991-807 (2006) 81 | http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.htm 82 | 83 | 84 | 85 | UCSD License(1.5) 86 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Read Me(ucsd-psystem-os) Read Me(ucsd-psystem-os) 2 | 3 | 4 | 5 | NAME 6 | ucsd-psystem-os - UCSD p-System file system 7 | 8 | DESCRIPTION 9 | The ucsd-psystem-os package is composed of several programs which 10 | collectively form the UCSD p-System operating system. 11 | 12 | ARCHIVE SITE 13 | The latest version of ucsd-psystem-os is available on the Web from: 14 | 15 | URL: http://miller.emu.id.au/pmiller/ucsd-psystem-os/ 16 | File: index.html # the ucsd-psystem-os home page 17 | File: ucsd-psystem-os-1.3.tar.gz # the complete source 18 | 19 | BUILDING ucsd-psystem-os 20 | Full instructions for building ucsd-psystem-os may be found on the web 21 | at http://miller.emu.id.au/pmiller/ucsd-psystem-os/building.html 22 | 23 | LICENSE 24 | See the LICENSE and LICENSE-UCSD files included in the source tarball. 25 | 26 | MAINTAINER 27 | Peter Miller E-Mail: pmiller@opensource.org.au 28 | /\/\* WWW: http://miller.emu.id.au/pmiller/ 29 | 30 | 31 | 32 | Reference Manual ucsd-psystem-os Read Me(ucsd-psystem-os) 33 | -------------------------------------------------------------------------------- /arch/00readme.txt: -------------------------------------------------------------------------------- 1 | # 2 | # UCSD p-System Operating System 3 | # Copyright (C) 2010 Peter Miller 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the ucsd-psystem-os project nor the names of its 14 | # contributors may be used to endorse or promote products derived from 15 | # this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | # POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | 30 | The "arch" directory is populated with files and programs specific to 31 | the microprocessor. 32 | 33 | The "host" directory is populated with files and programs specific 34 | to a particular brand of system, that contains within it one of the 35 | microprocessors in the "host" directory. 36 | 37 | For example, the skeleton of the "arch" directory would look something 38 | like this: 39 | 40 | arch/ 41 | 6502/ 42 | assembler/ 43 | # The assembler is written in Pascal. There is a different 44 | # assembler for each microprocessor, but it is not tied to 45 | # any one architecture (brand). 46 | main.text 47 | interpreter/ 48 | # The main body of the interpreter, except for the architecture 49 | # (brand) specific portions needed for disk controller and uart 50 | # support; those are accessed with a .include directive. 51 | main.asm.text 52 | decops/ 53 | # The DECOPS procedure for the long_integer instrinsic unit. 54 | main.asm.text 55 | transcendental/ 56 | # The assembler procedures for the transcendental instrinsic unit. 57 | main.asm.text 58 | turtle_graphics/ 59 | # The assembler procedures for the turtle_graphics instrinsic unit. 60 | main.asm.text 61 | pdp11/ 62 | ...structure as above, contents differ 63 | z80/ 64 | ...structure as above, contents differ 65 | ...etc 66 | 67 | For example, the skeleton of the "host" directory would look something 68 | like this: 69 | 70 | host/ 71 | apple/ 72 | interpreter/ 73 | # The arch/${arch}/interpreter/arch.asm.text file will be 74 | # copied into the interpreter directory before the Makefile 75 | # assembles the interpreter, so that a single .include 76 | # directive is enough to customize the interpreter for the 77 | # host (brand). 78 | arch.asm.text 79 | boot/ 80 | # The arch/${arch}/boot/main.asm.text file contaisn the boot code 81 | # that goes on the boot sectors of bootable disks will be 82 | # heavily device (brand) dependent, because it must work 83 | # with the boot roms of the specific device hardware present 84 | # in a host (brand). 85 | main.asm.text 86 | system/ 87 | # The arch/${arch}/system/gotoxy.inc.text file contaisn the 88 | # Pascal code for moving the cursor. Included by the 89 | # system, rather than having to use BINDER to glue it in 90 | # afterwards. 91 | gotoxy.inc.text 92 | # The arch/${arch}/miscinfo.text file contains the settings for 93 | # a specific system, to be able to move the cursor and recognize 94 | # arrow keys, rather than having to run SETUP after the system 95 | # is going. Translated to binary bu ucsdpsys_setup from the 96 | # ucsd-psystem-xc project. 97 | miscinfo.text 98 | kim1/ 99 | interpreter/arch.asm.text 100 | boot/main.asm.text 101 | system/gotoxy.text 102 | miscinfo.text 103 | terak/ 104 | ...structure as above, contents differ 105 | lsi11/ 106 | ...structure as above, contents differ 107 | trs80/ 108 | ...structure as above, contents differ 109 | ...etc 110 | 111 | The "klebsch" host refers to the Klebsch interpreter present in 112 | the ucsd-psystem-vm project, used (by default) when emulating the 113 | UCSD p-System. In theory, you can use a "klebsch" host with any 114 | microprocessor arch, but that has only been tested for the 6502. 115 | -------------------------------------------------------------------------------- /arch/pdp11/assembler/module.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | /* all += datadir/system.assmbler; */ 31 | 32 | datadir/system.assmbler: arch/pdp11/assembler/main.code 33 | set shallow 34 | { 35 | cp [resolve [need]] [target]; 36 | } 37 | -------------------------------------------------------------------------------- /arch/pdp11/interpreter/main.asm.text: -------------------------------------------------------------------------------- 1 | ; 2 | ; UCSD p-System Operating System 3 | ; Copyright (C) 2010 Peter Miller 4 | ; 5 | ; Redistribution and use in source and binary forms, with or without 6 | ; modification, are permitted provided that the following conditions are met: 7 | ; 8 | ; * Redistributions of source code must retain the above copyright notice, 9 | ; this list of conditions and the following disclaimer. 10 | ; * Redistributions in binary form must reproduce the above copyright 11 | ; notice, this list of conditions and the following disclaimer in the 12 | ; documentation and/or other materials provided with the distribution. 13 | ; * Neither the name of the ucsd-psystem-os project nor the names of its 14 | ; contributors may be used to endorse or promote products derived from 15 | ; this software without specific prior written permission. 16 | ; 17 | ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | ; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | ; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | ; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | ; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | ; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | ; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | ; POSSIBILITY OF SUCH DAMAGE. 28 | ; 29 | 30 | ; The options file may set any or all of several assembly-time 31 | ; options to customize the resulting object to particular hardware 32 | ; configurations. If no options file is given, the resulting .OBJ file 33 | ; will run on any PDP/LSI 11 model computer. 34 | ; 35 | ; The option file may include definitions of the following symbols: 36 | ; 37 | ; EIS - Causes code to be generated utilizing MUL, ASH, DIV, 38 | ; ASHC, and SOB instructions. 39 | ; 40 | ; LSI - Causes code for MTPS, MFPS, and SOB instructions 41 | ; 42 | ; FPI - Causes code for FADD, FSUB, FMUL, and FDIV instructions 43 | ; (These are 11/40 type floating point instructions, the 44 | ; 11/45 type instructions are not supported.) 45 | ; 46 | ; TERAK - Defines all of the above. 47 | ; 48 | ; FPI should not be defined unless EIS is defined. 49 | ; 50 | ; For LSI/11s with EISFIS chip, define all three. 51 | ; For LSI/11s without the EISFIS chip, define only LSI 52 | ; For 11/40s with EIS, define only EIS. 53 | ; For 11/10s don't define any of the options. 54 | ; 55 | EIS=1 56 | LSI=1 57 | FPI=1 58 | TERAK=1 59 | 60 | .proc interpreter 61 | .include macros.inc.text 62 | .include iotrap.inc.text 63 | .include mainop.inc.text 64 | .include procop.inc.text 65 | .include dl.inc.text 66 | .include lp.inc.text 67 | .include qx.inc.text 68 | .include rk.inc.text 69 | .include rx.inc.text 70 | .include tk.inc.text 71 | .end 72 | -------------------------------------------------------------------------------- /arch/z80/assembler/error-messages.text: -------------------------------------------------------------------------------- 1 | # 2 | # UCSD PASCAL - Version I.5 3 | # Copyright (C) 1978, 1979 Regents of the University of California 4 | # All Rights Reserved 5 | # 6 | # Permission to use, copy, modify and distribute any part of UCSD 7 | # PASCAL solely authored by UC authors before June 1, 1979 for 8 | # educational, research and non-profit purposes, without fee, and 9 | # without a written agreement is hereby granted, provided that the 10 | # above copyright notice, this paragraph and the following three 11 | # paragraphs appear in all copies. 12 | # 13 | # Those desiring to incorporate UCSD PASCAL into commercial products or 14 | # use for commercial purposes should contact the Technology Transfer & 15 | # Intellectual Property Services, University of California, San Diego, 16 | # 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | # Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | # 19 | # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | # INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | # THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | # DAMAGE. 24 | # 25 | # THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | # OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | # UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | # MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | # EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | # WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | # THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | # OTHER RIGHTS. 33 | # 34 | # Case Number: SD1991-807 (2006) 35 | # http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | # 37 | 1: undefined label 38 | 2: operand out of range 39 | 3: must have procedure name 40 | 4: number of parameters expected 41 | 5: extra garbage on line 42 | 6: input line over 80 characters 43 | 7: not enough .IF's 44 | 8: must be declared in .ASECT before used 45 | 9: identifier previously declared 46 | 10: improper format 47 | 11: .EQU expected 48 | 12: must .EQU before use if not to a label 49 | 13: macro identifier expected 50 | 14: word addressed machine 51 | 15: backward .ORG currently not allowed 52 | 16: identifier expected 53 | 17: constant expected 54 | 18: invalid structure 55 | 19: extra special symbol 56 | 20: branch too far 57 | 21: variable not PC relative 58 | 22: illegal macro parameter index 59 | 23: not enough macro parameters 60 | 24: operand not absolute 61 | 25: illegal use of special symbols 62 | 26: ill-formed expression 63 | 27: not enough operands 64 | 28: cannot handle this relative expression 65 | 29: constant overflow 66 | 30: illegal decimal constant 67 | 31: illegal octal constant 68 | 32: illegal binary constant 69 | 33: invalid key word 70 | 34: macro stack overflow - 5 nesting limit 71 | 35: include files may not be nested 72 | 36: unexpected end of input 73 | 37: this is a bad place for an .INCLUDE file 74 | 38: only labels & comments may occupy col 1 75 | 39: expected local label 76 | 40: local label stack overflow 77 | 41: string constant must be on one line 78 | 42: string constant exceeds 80 characters 79 | 43: illegal use of macro parameter 80 | 44: no local labels in .ASECT 81 | 45: expected key word 82 | 46: string expected 83 | 47: bad block, parity error (CRC) 84 | 48: bad unit number 85 | 49: bad mode, illegal operation 86 | 50: undefined hardware error 87 | 51: lost unit, unit is no longer on-line 88 | 52: lost file, file is no longer in director 89 | 53: bad title, illegal file name 90 | 54: no room, insufficient space on disk 91 | 55: no unit, no such volume on-line 92 | 56: no file, no such file on volume 93 | 57: duplicate file 94 | 58: not closed, attempt to open an open file 95 | 59: not open, attempt to access a closed fil 96 | 60: bad format, error in reading real or int 97 | 61: nested macro definitions illegal 98 | 62: '=' or '<>' expected 99 | 63: may not EQU to undefined labels 100 | 64: must declare .ABSOLUTE before 1st .PROC 101 | 76: incorrect operand format 102 | 77: close paren ')' expected 103 | 78: comma ',' expected 104 | 79: plus '+' expected 105 | 80: open paren '(' expected 106 | 81: stack pointer 'SP' expected 107 | 82: 'HL' expected 108 | 83: illegal 'cc' condition code 109 | 84: register 'C' expected 110 | 85: register expected 'r' 111 | 86: register 'A' expected 112 | -------------------------------------------------------------------------------- /arch/z80/assembler/opcode-data.text: -------------------------------------------------------------------------------- 1 | # 2 | # UCSD PASCAL - Version I.5 3 | # Copyright (C) 1978, 1979 Regents of the University of California 4 | # All Rights Reserved 5 | # 6 | # Permission to use, copy, modify and distribute any part of UCSD 7 | # PASCAL solely authored by UC authors before June 1, 1979 for 8 | # educational, research and non-profit purposes, without fee, and 9 | # without a written agreement is hereby granted, provided that the 10 | # above copyright notice, this paragraph and the following three 11 | # paragraphs appear in all copies. 12 | # 13 | # Those desiring to incorporate UCSD PASCAL into commercial products or 14 | # use for commercial purposes should contact the Technology Transfer & 15 | # Intellectual Property Services, University of California, San Diego, 16 | # 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | # Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | # 19 | # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | # FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | # INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | # THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | # DAMAGE. 24 | # 25 | # THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | # OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | # UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | # MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | # EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | # WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | # THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | # OTHER RIGHTS. 33 | # 34 | # Case Number: SD1991-807 (2006) 35 | # http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | # 37 | { "R", 0x004F, defir }, 38 | { "I", 0x0047, defir }, 39 | { "POP", 0x00E1, ops1 }, 40 | { "PUSH", 0x00E5, ops1 }, 41 | { "BC", 0x0000, defrp }, 42 | { "DE", 0x0001, defrp }, 43 | { "HL", 0x0002, defrp }, 44 | { "SP", 0x0003, defrp }, 45 | { "AF", 0x0003, defrp }, 46 | { "B", 0x0000, defreg }, 47 | { "C", 0x0001, defreg }, 48 | { "D", 0x0002, defreg }, 49 | { "E", 0x0003, defreg }, 50 | { "H", 0x0004, defreg }, 51 | { "L", 0x0005, defreg }, 52 | { "A", 0x0007, defreg }, 53 | { "NZ", 0x0000, defcc }, 54 | { "Z", 0x0001, defcc }, 55 | { "NC", 0x0002, defcc }, 56 | { "PO", 0x0004, defcc }, 57 | { "PE", 0x0005, defcc }, 58 | { "P", 0x0006, defcc }, 59 | { "M", 0x0007, defcc }, 60 | { "IX", 0x00DD, defabs }, 61 | { "IY", 0x00FD, defabs }, 62 | { "EX", 0x00E3, ops2 }, 63 | { "ADD", 0x0986, ops3 }, 64 | { "ADC", 0x4A8E, ops4 }, 65 | { "SBC", 0x429E, ops4 }, 66 | { "SUB", 0x0096, ops5 }, 67 | { "AND", 0x00A6, ops5 }, 68 | { "OR", 0x00B6, ops5 }, 69 | { "XOR", 0x00AE, ops5 }, 70 | { "CP", 0x00BE, ops5 }, 71 | { "INC", 0x2334, ops6 }, 72 | { "DEC", 0x2B35, ops6 }, 73 | { "RLC", 0x06CB, ops7 }, 74 | { "RL", 0x16CB, ops7 }, 75 | { "RRC", 0x0ECB, ops7 }, 76 | { "RR", 0x1ECB, ops7 }, 77 | { "SLA", 0x26CB, ops7 }, 78 | { "SRA", 0x2ECB, ops7 }, 79 | { "SRL", 0x3ECB, ops7 }, 80 | { "BIT", 0x46CB, ops8 }, 81 | { "SET", 0xC6CB, ops8 }, 82 | { "RES", 0x86CB, ops8 }, 83 | { "JP", 0xC3E9, ops9 }, 84 | { "DJNZ", 0x0010, ops10 }, 85 | { "JR", 0x0000, ops11 }, 86 | { "CALL", 0xC4CD, ops12 }, 87 | { "IN", 0xEDDB, ops13 }, 88 | { "OUT", 0xEDD3, ops14 }, 89 | { "EXX", 0x00D9, ops15 }, 90 | { "DAA", 0x0027, ops15 }, 91 | { "CPL", 0x002F, ops15 }, 92 | { "CCF", 0x003F, ops15 }, 93 | { "SCF", 0x0037, ops15 }, 94 | { "NOP", 0x0000, ops15 }, 95 | { "HALT", 0x0076, ops15 }, 96 | { "DI", 0x00F3, ops15 }, 97 | { "EI", 0x00FB, ops15 }, 98 | { "RLCA", 0x0007, ops15 }, 99 | { "RLA", 0x0017, ops15 }, 100 | { "RRCA", 0x000F, ops15 }, 101 | { "RRA", 0x001F, ops15 }, 102 | { "RET", 0xC0C9, ops20 }, 103 | { "IM", 0x00ED, ops16 }, 104 | { "RST", 0x00C7, ops17 }, 105 | { "LDI", 0xEDA0, ops18 }, 106 | { "LDIR", 0xEDB0, ops18 }, 107 | { "LDD", 0xEDA8, ops18 }, 108 | { "LDDR", 0xEDB8, ops18 }, 109 | { "CPI", 0xEDA1, ops18 }, 110 | { "CPIR", 0xEDB1, ops18 }, 111 | { "CPD", 0xEDA9, ops18 }, 112 | { "CPDR", 0xEDB9, ops18 }, 113 | { "NEG", 0xED44, ops18 }, 114 | { "RLD", 0xED6F, ops18 }, 115 | { "RRD", 0xED67, ops18 }, 116 | { "RETI", 0xED4D, ops18 }, 117 | { "RETN", 0xED45, ops18 }, 118 | { "INI", 0xEDA2, ops18 }, 119 | { "INIR", 0xEDB2, ops18 }, 120 | { "IND", 0xEDAA, ops18 }, 121 | { "INDR", 0xEDBA, ops18 }, 122 | { "OUTI", 0xEDA3, ops18 }, 123 | { "OTIR", 0xEDB3, ops18 }, 124 | { "OUTD", 0xEDAB, ops18 }, 125 | { "OTDR", 0xEDBB, ops18 }, 126 | { "LD", 0x0000, ops19 }, 127 | -------------------------------------------------------------------------------- /arch/z80/interpreter/main.asm.text: -------------------------------------------------------------------------------- 1 | ; 2 | ; UCSD PASCAL - Version I.5 3 | ; Copyright (C) 1978, 1979 Regents of the University of California 4 | ; All Rights Reserved 5 | ; 6 | ; Permission to use, copy, modify and distribute any part of UCSD 7 | ; PASCAL solely authored by UC authors before June 1, 1979 for 8 | ; educational, research and non-profit purposes, without fee, and 9 | ; without a written agreement is hereby granted, provided that the 10 | ; above copyright notice, this paragraph and the following three 11 | ; paragraphs appear in all copies. 12 | ; 13 | ; Those desiring to incorporate UCSD PASCAL into commercial products or 14 | ; use for commercial purposes should contact the Technology Transfer & 15 | ; Intellectual Property Services, University of California, San Diego, 16 | ; 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | ; Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | ; 19 | ; IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | ; FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | ; INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | ; THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | ; DAMAGE. 24 | ; 25 | ; THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | ; OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | ; UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | ; MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | ; EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | ; WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | ; THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | ; OTHER RIGHTS. 33 | ; 34 | ; Case Number: SD1991-807 (2006) 35 | ; http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | ; 37 | ;;; Source: http://bitsavers.org/bits/UCSD_Pascal/ucsd_II.0/ 38 | ;;; U120_Z80_P-CODE_SOURCE.raw.gz 39 | ;;; Date: 1979-Feb-09 40 | 41 | .PROC INTERP 42 | 43 | OFF .EQU 0 ; definitions for conditionals 44 | ON .EQU ~OFF 45 | 46 | ROM .EQU 100H ; address definition for interpreter code 47 | MAXADR .EQU 0D7FEH ; highest possible memory byte 48 | RAM .EQU 0 ; address of interpreter variables (Not 49 | ; yet meaningful 50 | IOSIZE .EQU 20. 51 | 52 | Z80 .EQU ON ; CPU type and particular model 53 | CPM .EQU ON 54 | DDT .EQU OFF 55 | TEK .EQU OFF 56 | CML .EQU OFF 57 | NMS .EQU OFF 58 | 59 | ; Listing controls 60 | 61 | LSTINT .EQU ON ; Interpreter main root section 62 | LSTVARS .EQU OFF ; Variable loading, storing, moving, indexing 63 | LSTARIT .EQU OFF ; Simple top-of-stack arithmetic and comparisons 64 | LSTSET .EQU OFF ; Set arithmetic and comparisons 65 | LSTFP .EQU OFF ; Basic floating point stuff 66 | LSTFPT .EQU OFF ; Transendental floating point routines 67 | LSTPROC .EQU OFF ; Procedure calling, returning, segment loading, 68 | ; unloading, relocation, and jumps 69 | LSTSTP .EQU OFF ; Standard procedure caller and misc. standard procs. 70 | LSTIO .EQU OFF ; Unit io and BIOS callers 71 | LSTBOOT .EQU OFF ; Pascal-level bootstrap 72 | 73 | .include interp.asm.text 74 | .include vars.asm.text 75 | .include arith.asm.text 76 | .include set1.asm.text 77 | .include set2.asm.text 78 | 79 | .include fpl.asm.text 80 | .include fpi.asm.text 81 | ;.inlcude nofpi.asm.text 82 | 83 | ;.include fpt.asm.text 84 | .include nofpt.asm.text 85 | 86 | .include proc1.asm.text 87 | .include proc2.asm.text 88 | .include stp.asm.text 89 | .include cpmio.asm.text 90 | .include boot.asm.text 91 | 92 | .END 93 | -------------------------------------------------------------------------------- /arch/z80/interpreter/nofpi.inc.text: -------------------------------------------------------------------------------- 1 | ; 2 | ; UCSD PASCAL - Version I.5 3 | ; Copyright (C) 1978, 1979 Regents of the University of California 4 | ; All Rights Reserved 5 | ; 6 | ; Permission to use, copy, modify and distribute any part of UCSD 7 | ; PASCAL solely authored by UC authors before June 1, 1979 for 8 | ; educational, research and non-profit purposes, without fee, and 9 | ; without a written agreement is hereby granted, provided that the 10 | ; above copyright notice, this paragraph and the following three 11 | ; paragraphs appear in all copies. 12 | ; 13 | ; Those desiring to incorporate UCSD PASCAL into commercial products or 14 | ; use for commercial purposes should contact the Technology Transfer & 15 | ; Intellectual Property Services, University of California, San Diego, 16 | ; 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | ; Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | ; 19 | ; IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | ; FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | ; INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | ; THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | ; DAMAGE. 24 | ; 25 | ; THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | ; OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | ; UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | ; MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | ; EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | ; WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | ; THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | ; OTHER RIGHTS. 33 | ; 34 | ; Case Number: SD1991-807 (2006) 35 | ; http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | ; 37 | ;;; Source: http://bitsavers.org/bits/UCSD_Pascal/ucsd_II.0/ 38 | ;;; U120_Z80_P-CODE_SOURCE.raw.gz 39 | ;;; Date: 1978-Oct-30 40 | 41 | .IF ~LSTFP 42 | .NOLIST 43 | .ELSE 44 | .LIST 45 | .ENDC 46 | 47 | ;Copyright (c) 1978 48 | ; by the Regents of the University of California, San Diego 49 | 50 | ; Beginning of file NOFPI 51 | 52 | FPFADD 53 | FPFSUB 54 | FPFMUL 55 | FPFDIV 56 | FPFFIX 57 | FPFFLOAT 58 | 59 | FPFNEG 60 | FPFRND 61 | FPFABS 62 | FPFSQR 63 | FPFINV 64 | FPFPOT 65 | 66 | FLT 67 | FLO 68 | 69 | ABR ; Real absolute value 70 | ADR ; Add reals 71 | SBR ; Subtract reals 72 | MPR ; Multiply reals 73 | SQR ; Square reals 74 | DVR ; Divide reals 75 | NGR ; Negate real 76 | TNC ; truncate real and convert to integer 77 | RND ; round real 78 | POT ; 10.0 ^ n 79 | REALCP 80 | REALC ; compare the real numbers on the top of stack 81 | 82 | JP NOTIMP 83 | 84 | ; End of file NOFPI 85 | -------------------------------------------------------------------------------- /arch/z80/interpreter/nofpt.inc.text: -------------------------------------------------------------------------------- 1 | ; 2 | ; UCSD PASCAL - Version I.5 3 | ; Copyright (C) 1978, 1979 Regents of the University of California 4 | ; All Rights Reserved 5 | ; 6 | ; Permission to use, copy, modify and distribute any part of UCSD 7 | ; PASCAL solely authored by UC authors before June 1, 1979 for 8 | ; educational, research and non-profit purposes, without fee, and 9 | ; without a written agreement is hereby granted, provided that the 10 | ; above copyright notice, this paragraph and the following three 11 | ; paragraphs appear in all copies. 12 | ; 13 | ; Those desiring to incorporate UCSD PASCAL into commercial products or 14 | ; use for commercial purposes should contact the Technology Transfer & 15 | ; Intellectual Property Services, University of California, San Diego, 16 | ; 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | ; Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | ; 19 | ; IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | ; FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | ; INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | ; THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | ; DAMAGE. 24 | ; 25 | ; THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | ; OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | ; UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | ; MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | ; EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | ; WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | ; THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | ; OTHER RIGHTS. 33 | ; 34 | ; Case Number: SD1991-807 (2006) 35 | ; http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | ; 37 | ;;; Source: http://bitsavers.org/bits/UCSD_Pascal/ucsd_II.0/ 38 | ;;; U120_Z80_P-CODE_SOURCE.raw.gz 39 | ;;; Date: 1978-Sep-19 40 | 41 | .IF ~LSTFPT 42 | .NOLIST 43 | .ELSE 44 | .LIST 45 | .ENDC 46 | 47 | ; Copyright (c) 1978 by the Regents of the University of Califormia 48 | ; San Diego 49 | 50 | ; Beginning of file NOFPT 51 | 52 | 53 | SIN ; sin standard procedure 54 | COS ; cos standard procedure 55 | EXP ; exp standard procedure 56 | ATAN ; atan standard procedure 57 | SQT ; sqrt standard procedure 58 | LOG ; log base 10 59 | LN ; log base e 60 | JP NOTIMP 61 | 62 | ; End of file NOFPT 63 | -------------------------------------------------------------------------------- /basic/meson.build: -------------------------------------------------------------------------------- 1 | basic_main_pas_code = custom_target( 2 | 'basic_main_pas_code', 3 | output : 'main.code', 4 | input : 'main.text', 5 | command : pc_system_command, 6 | ) 7 | 8 | basic_code = custom_target( 9 | 'basic_code', 10 | output : 'basic.code', 11 | input : basic_main_pas_code, 12 | command : ar_system_command, 13 | build_by_default : true, 14 | ) 15 | -------------------------------------------------------------------------------- /binder/meson.build: -------------------------------------------------------------------------------- 1 | binder_code = custom_target( 2 | 'binder_code', 3 | output : 'binder.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /bios.diag/meson.build: -------------------------------------------------------------------------------- 1 | bios_diag_code = custom_target( 2 | 'bios_diag_code', 3 | output : 'bios.diag.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /calc/meson.build: -------------------------------------------------------------------------------- 1 | calc_code = custom_target( 2 | 'calc_code', 3 | output : 'calc.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /charset/module.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | all += datadir/system.charset; 31 | 32 | datadir/system.charset: charset/bit-map-font.text 33 | set shallow 34 | { 35 | /* from ucsd-psystem-fs package */ 36 | ucsdpsys_charset -e [resolve [need]] [target]; 37 | } 38 | 39 | /* 40 | * You can make plenty more of these with BigText. 41 | * http://bigtext.sourceforge.net/ 42 | */ 43 | 44 | #if [find_command bigtext] 45 | 46 | generated-fonts = 47 | 5x7 48 | 5x8 49 | 6x9 50 | 6x10 51 | 7x13 52 | fixed 53 | ; 54 | 55 | all += [fromto % charset/%.text [generated-fonts]] ; 56 | 57 | charset/%.text: 58 | if [in % [generated-fonts]] 59 | { 60 | bigtext --apple-pascal % > [target]; 61 | } 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /compiler/error-messages.text: -------------------------------------------------------------------------------- 1 | 1: Error in simple type 2 | 2: Identifier expected 3 | 3: 'PROGRAM' expected 4 | 4: ')' expected 5 | 5: ':' expected 6 | 6: Illegal symbol (possibly missing ';' on line above) 7 | 7: Error in parameter list 8 | 8: 'OF' expected 9 | 9: '(' expected 10 | 10: Error in type 11 | 11: '[' expected 12 | 12: ']' expected 13 | 13: 'END' expected 14 | 14: ';' expected (possibly on line above) 15 | 15: Integer expected 16 | 16: '=' expected 17 | 17: 'BEGIN' expected 18 | 18: Error in declaration part 19 | 19: error in 20 | 20: '.' expected 21 | 21: '*' expected 22 | 22: 'Interface' expected 23 | 23: 'Implementation' expected 24 | 24: 'Unit' expected 25 | 50: Error in constant 26 | 51: ':=' expected 27 | 52: 'THEN' expected 28 | 53: 'UNTIL' expected 29 | 54: 'DO' expected 30 | 55: 'TO' or 'DOWNTO' expected in for statement 31 | 56: 'IF' expected 32 | 57: 'FILE' expected 33 | 58: Error in (bad expression) 34 | 59: Error in variable 35 | 101: Identifier declared twice 36 | 102: Low bound exceeds high bound 37 | 103: Identifier is not of the appropriate class 38 | 104: Undeclared identifier 39 | 105: sign not allowed 40 | 106: Number expected 41 | 107: Incompatible subrange types 42 | 108: File not allowed here 43 | 109: Type must not be real 44 | 110: type must be scalar or subrange 45 | 111: Incompatible with part 46 | 112: Index type must not be real 47 | 113: Index type must be a scalar or a subrange 48 | 114: Base type must not be real 49 | 115: Base type must be a scalar or a subrange 50 | 116: Error in type of standard procedure parameter 51 | 117: Unsatisified forward reference 52 | 118: Forward reference type identifier in variable declaration 53 | 119: Re-specified params not OK for a forward declared procedure 54 | 120: Function result type must be scalar, subrange or pointer 55 | 121: File value parameter not allowed 56 | 122: A forward declared function's result type can't be re-specified 57 | 123: Missing result type in function declaration 58 | 124: F-format for reals only 59 | 125: Error in type of standard procedure parameter 60 | 126: Number of parameters does not agree with declaration 61 | 127: Illegal parameter substitution 62 | 128: Result type does not agree with declaration 63 | 129: Type conflict of operands 64 | 130: Expression is not of set type 65 | 131: Tests on equality allowed only 66 | 132: Strict inclusion not allowed 67 | 133: File comparison not allowed 68 | 134: Illegal type of operand(s) 69 | 135: Type of operand must be boolean 70 | 136: Set element type must be scalar or subrange 71 | 137: Set element types must be compatible 72 | 138: Type of variable is not array 73 | 139: Index type is not compatible with the declaration 74 | 140: Type of variable is not record 75 | 141: Type of variable must be file or pointer 76 | 142: Illegal parameter solution 77 | 143: Illegal type of loop control variable 78 | 144: Illegal type of expression 79 | 145: Type conflict 80 | 146: Assignment of files not allowed 81 | 147: Label type incompatible with selecting expression 82 | 148: Subrange bounds must be scalar 83 | 149: Index type must be integer 84 | 150: Assignment to standard function is not allowed 85 | 151: Assignment to formal function is not allowed 86 | 152: No such field in this record 87 | 153: Type error in read 88 | 154: Actual parameter must be a variable 89 | 155: Control variable cannot be formal or non-local 90 | 156: Multidefined case label 91 | 157: Too many cases in case statement 92 | 158: No such variant in this record 93 | 159: Real or string tagfields not allowed 94 | 160: Previous declaration was not forward 95 | 161: Again forward declared 96 | 162: Parameter size must be constant 97 | 163: Missing variant in declaration 98 | 164: Substition of standard proc/func not allowed 99 | 165: Multidefined label 100 | 166: Multideclared label 101 | 167: Undeclared label 102 | 168: Undefined label 103 | 169: Error in base set 104 | 170: Value parameter expected 105 | 171: Standard file was re-declared 106 | 172: Undeclared external file 107 | 174: Pascal function or procedure expected 108 | 175: Actual parameter max string length < formal Max length 109 | 182: Nested units not allowed 110 | 183: External declaration not allowed at this nesting level 111 | 184: External declaration not allowed in interface section 112 | 185: Segment declaration not allowed in unit 113 | 186: Labels not allowed in interface section 114 | 187: Attempt to open library unsuccessful 115 | 188: Unit not declared in previous uses declaration 116 | 189: 'Uses' not allowed at this nesting level 117 | 190: Unit not in library 118 | 191: No private files 119 | 192: 'Uses' must be in interface section 120 | 193: Not enough room for this operation 121 | 194: Comment must appear at top of program 122 | 195: Unit not importable 123 | 201: Error in real number - digit expected 124 | 202: String constant must not exceed source line 125 | 203: Integer constant exceeds range 126 | 204: 8 or 9 in octal number 127 | 250: Too many scopes of nested identifiers 128 | 251: Too many nested procedures or functions 129 | 252: Too many forward references of procedure entries 130 | 253: Procedure too long 131 | 254: Too many long constants in this procedure 132 | 256: Too many external references 133 | 257: Too many externals 134 | 258: Too many local files 135 | 259: Expression too complicated 136 | 300: Division by zero 137 | 301: No case provided for this value 138 | 302: Index expression out of bounds 139 | 303: Value to be assinged is out of bounds 140 | 304: Element expression out of range 141 | 350: No data segment allocated 142 | 351: Segment used twice 143 | 352: No code segment allocated 144 | 353: Non-intrinsic unit called from intrinsic unit 145 | 354: Too many segments for Seg Dictionary 146 | 398: Implementation restriction 147 | 399: Implementation restriction 148 | 400: Illegal character in text 149 | 401: Unexpected end of input 150 | 402: Error in writing code file, not enough room 151 | 403: Error in reading include file 152 | 404: Error in writing list file, not enough room 153 | 405: Call not allowed in separate procedure 154 | 406: Include file not legal 155 | 407: Too many libraries 156 | 408: (*$S+*) needed to compile units 157 | 500: General assembler error 158 | -------------------------------------------------------------------------------- /compiler/main.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD PASCAL - Version I.5 3 | * Copyright (C) 1978, 1979 Regents of the University of California 4 | * All Rights Reserved 5 | * 6 | * Permission to use, copy, modify and distribute any part of UCSD 7 | * PASCAL solely authored by UC authors before June 1, 1979 for 8 | * educational, research and non-profit purposes, without fee, and 9 | * without a written agreement is hereby granted, provided that the 10 | * above copyright notice, this paragraph and the following three 11 | * paragraphs appear in all copies. 12 | * 13 | * Those desiring to incorporate UCSD PASCAL into commercial products or 14 | * use for commercial purposes should contact the Technology Transfer & 15 | * Intellectual Property Services, University of California, San Diego, 16 | * 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | * Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | * 19 | * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | * DAMAGE. 24 | * 25 | * THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | * OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | * MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | * EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | * THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | * OTHER RIGHTS. 33 | * 34 | * Case Number: SD1991-807 (2006) 35 | * http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | *) 37 | 38 | (* 39 | * UCSD p-System Operating System 40 | * Copyright (C) 2010 Peter Miller 41 | * 42 | * Redistribution and use in source and binary forms, with or without 43 | * modification, are permitted provided that the following conditions are met: 44 | * 45 | * * Redistributions of source code must retain the above copyright notice, 46 | * this list of conditions and the following disclaimer. 47 | * * Redistributions in binary form must reproduce the above copyright 48 | * notice, this list of conditions and the following disclaimer in the 49 | * documentation and/or other materials provided with the distribution. 50 | * * Neither the name of the ucsd-psystem-os project nor the names of its 51 | * contributors may be used to endorse or promote products derived from 52 | * this software without specific prior written permission. 53 | * 54 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 55 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 56 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 57 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 58 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 59 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 60 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 61 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 62 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 63 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 64 | * POSSIBILITY OF SUCH DAMAGE. 65 | *) 66 | 67 | (* SWAPPING PASCAL COMPILER INCLUDE FILES *) 68 | 69 | (*$T+*) (*$S+*) 70 | 71 | (*$I compglbls.text *) 72 | (*$I vstamp.inc.text *) 73 | (*$I compinit.text *) 74 | (*$I decpart.a.text *) 75 | (*$I decpart.b.text *) 76 | (*$I decpart.c.text *) 77 | (*$I bodypart.a.text *) 78 | (*$I bodypart.b.text *) 79 | (*$I bodypart.c.text *) 80 | (*$I bodypart.d.text *) 81 | (*$I bodypart.e.text *) 82 | (*$I unitpart.text *) 83 | (*$I procs.a.text *) 84 | (*$I procs.b.text *) 85 | (*$I block.text *) 86 | 87 | BEGIN (* PASCALCOMPILER *) 88 | COMPINIT; 89 | TIME(LGTH,LOWTIME); 90 | BLOCK(BLOCKBEGSYS+STATBEGSYS-[CASESY]); 91 | IF SY <> PERIOD THEN ERROR(21); 92 | IF LIST THEN 93 | BEGIN SCREENDOTS := SCREENDOTS+1; 94 | SYMBUFP^[SYMCURSOR] := CHR(EOL); 95 | SYMCURSOR := SYMCURSOR+1; 96 | PRINTLINE 97 | END; 98 | USERINFO.ERRBLK := 0; 99 | TIME(LGTH,STARTDOTS); LOWTIME := STARTDOTS-LOWTIME; 100 | UNITWRITE(3,IC,7); 101 | IF DLINKERINFO OR CLINKERINFO THEN 102 | BEGIN 103 | (* 104 | * Note that this is ambiguous. We could have a LINKED or UNITSEG 105 | * segment, and we are turning both of them into the same thing. 106 | * Are there heuristics to help the linker go in the reverse 107 | * direction when it is done? What are they? 108 | *) 109 | SEGTABLE[SEG].SEGKIND := 1 (* HOSTSEG *); 110 | WRITELINKERINFO(TRUE) 111 | END; 112 | CLOSE(LP,LOCK); 113 | IF NOISY THEN WRITELN(OUTPUT); 114 | WRITE(OUTPUT,SCREENDOTS,' lines'); 115 | IF LOWTIME > 0 THEN 116 | WRITE(OUTPUT,', ',(LOWTIME+30) DIV 60,' secs, ', 117 | ROUND((3600/LOWTIME)*SCREENDOTS),' lines/min'); 118 | IF NOISY THEN 119 | BEGIN 120 | WRITELN(OUTPUT); 121 | WRITE(OUTPUT,'Smallest available space = ',SMALLESTSPACE,' words'); 122 | END; 123 | IC := 0; 124 | FOR SEG := 0 TO MAXSEG DO 125 | WITH SEGTABLE[SEG] DO 126 | BEGIN GENWORD(DISKADDR); GENWORD(CODELENG) END; 127 | FOR SEG := 0 TO MAXSEG DO 128 | WITH SEGTABLE[SEG] DO 129 | FOR LGTH := 1 TO 8 DO 130 | GENBYTE(ORD(SEGNAME[LGTH])); 131 | FOR SEG := 0 TO MAXSEG DO GENWORD(SEGTABLE[SEG].SEGKIND); 132 | FOR SEG := 0 TO MAXSEG DO GENWORD(SEGTABLE[SEG].TEXTADDR); 133 | FOR LGTH := 1 TO 80 DO 134 | IF COMMENT <> NIL THEN GENBYTE(ORD(COMMENT^[LGTH])) ELSE GENBYTE(0); 135 | FOR LGTH := 1 TO 256 - 8*(MAXSEG + 1) - 40 DO GENWORD(0); 136 | CURBLK := 0; CURBYTE := 0; WRITECODE(TRUE) 137 | END (* PASCALCOMPILER *) ; 138 | 139 | BEGIN (* SYSTEM *) 140 | END. 141 | -------------------------------------------------------------------------------- /compiler/meson.build: -------------------------------------------------------------------------------- 1 | compiler_globals_text = fs.copyfile(globals_text) 2 | compiler_vstamp_inc_text = fs.copyfile(vstamp_inc_text) 3 | 4 | compiler_main_pas_code = custom_target( 5 | 'compiler_main_pas_code', 6 | output : 'main.code', 7 | input : 'main.text', 8 | depends : [compiler_globals_text, compiler_vstamp_inc_text], 9 | command : pc_system_command, 10 | ) 11 | 12 | system_compiler = custom_target( 13 | 'system_compiler', 14 | output : 'system.compiler', 15 | input : compiler_main_pas_code, 16 | command : ar_system_command, 17 | build_by_default : true, 18 | ) 19 | 20 | system_syntax = fs.copyfile('error-messages.text', 'system.syntax') 21 | -------------------------------------------------------------------------------- /compiler/module.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010, 2011 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | pascal-depends-files = 31 | [addsuffix ".d" [match_mask %/main.text [source_files]]] 32 | ; 33 | #if [count [pascal-depends-files]] 34 | #include-cooked [pascal-depends-files] 35 | #endif 36 | 37 | %1/%.text.d: %1/%.text 38 | set no-cascade 39 | { 40 | ucsdpsys_depends 41 | -I%1 42 | [addprefix "-J" [search_list]] 43 | -r 44 | -o[target] 45 | -P "'cascade %1/%.text = '" 46 | -S " ';'" 47 | [resolve %1/%.text] 48 | ; 49 | } 50 | 51 | pascal-text-files = [match_mask %1/main.text [source_files]]; 52 | pascal-text-files = [stringset [pascal-text-files] 53 | - 54 | pascalio/main.text 55 | yaloe/main.text 56 | ]; 57 | pascal-code-files = [fromto %0%.text %0%.code [pascal-text-files]]; 58 | 59 | /* all += [pascal-code-files]; */ 60 | 61 | #if 0 62 | 63 | %1/main.code: %1/main.text: %1/vstamp.inc.text 64 | etc/ucsdpsys-wrapper.sh 65 | { 66 | /* create a volume to work within. */ 67 | ucsdpsys_mkfs -B800 -LWORK temp.vol; 68 | 69 | /* put all of the files needed to compile into the work volume. */ 70 | ucsdpsys_disk -f temp.vol -p [resolve [match_mask %%0%%.text [need]]]; 71 | 72 | /* 73 | * That data section is 74 | * f for F(iler 75 | * p for P(refix -- like "cd" on Unix 76 | * work: the volume 77 | * q exit from the filer 78 | * c for C(ompile 79 | * main\n for the text file 80 | * main\n for the code file 81 | * h for halt 82 | */ 83 | sh etc/ucsdpsys-wrapper.sh -b- -w temp.vol 84 | /* FIXME: we will need the stage, too. */ 85 | [prepost "-S " "/datadir" [search_list]] 86 | set meter; 87 | data 88 | fpwork: 89 | qcmain 90 | main 91 | hhhhhhh 92 | dataend 93 | 94 | ucsdpsys_disk -f temp.vol -g [target]\=main.code; 95 | rm temp.vol; 96 | } 97 | 98 | #endif 99 | 100 | /* all += datadir/system.compiler datadir/system.syntax ; */ 101 | 102 | datadir/system.compiler: compiler/main.code 103 | set shallow 104 | { 105 | cp [resolve [need]] [target]; 106 | } 107 | 108 | datadir/system.syntax: compiler/error-messages.text 109 | { 110 | ucsdpsys_text -t -e < [resolve [need]] > [target]; 111 | } 112 | 113 | %/vstamp.inc.text: etc/vstamp.inc.text 114 | { 115 | cp [resolve etc/vstamp.inc.text] %/vstamp.inc.text; 116 | } 117 | -------------------------------------------------------------------------------- /copydupdir/main.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD PASCAL - Version I.5 3 | * Copyright (C) 1978, 1979 Regents of the University of California 4 | * All Rights Reserved 5 | * 6 | * Permission to use, copy, modify and distribute any part of UCSD 7 | * PASCAL solely authored by UC authors before June 1, 1979 for 8 | * educational, research and non-profit purposes, without fee, and 9 | * without a written agreement is hereby granted, provided that the 10 | * above copyright notice, this paragraph and the following three 11 | * paragraphs appear in all copies. 12 | * 13 | * Those desiring to incorporate UCSD PASCAL into commercial products or 14 | * use for commercial purposes should contact the Technology Transfer & 15 | * Intellectual Property Services, University of California, San Diego, 16 | * 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | * Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | * 19 | * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | * DAMAGE. 24 | * 25 | * THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | * OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | * MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | * EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | * THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | * OTHER RIGHTS. 33 | * 34 | * Case Number: SD1991-807 (2006) 35 | * http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | *) 37 | 38 | PROGRAM DUPLICATEDIRECTORYCOPIER; 39 | 40 | (*) This utility will copy the duplicate directory (*) 41 | (*) in blocks 6 - 9 into the standard directory in (*) 42 | (*) blocks 2 - 5. It will also mark DLASTBLK as 10 (*) 43 | (*) so as to maintain the duplicate directory. (*) 44 | 45 | 46 | CONST 47 | DIRBLOX = 4; {size of a directory in blocks} 48 | BLOCKBYTES = 511; {size of a block in bytes minus 1} 49 | 50 | FIRSTIDCHAR = 7; {location of first character in volume id} 51 | MAXIDLENGTH = 7; 52 | 53 | DUPDIRLASTBLK = 10; 54 | 55 | VAR 56 | UNITID : STRING[1]; 57 | DRIVENUM : INTEGER; 58 | BUFFER : PACKED ARRAY [ 1 .. DIRBLOX, 0 .. BLOCKBYTES ] OF CHAR; 59 | IDLENGTH, N : INTEGER; 60 | 61 | FUNCTION YES: BOOLEAN; 62 | VAR CH : CHAR; 63 | BEGIN 64 | UNITREAD( 1, CH, 1, 0, 0 ); 65 | WRITELN; 66 | YES := (CH = 'Y'); 67 | END; 68 | 69 | BEGIN { of Duplicate Directory Copier } 70 | 71 | PAGE(OUTPUT); 72 | WRITELN; 73 | WRITELN( 'Duplicate Directory Copier { July 12, 1978 } ' ); 74 | WRITELN; 75 | 76 | REPEAT 77 | WRITE( ' Enter drive # of user''s disk [4 or 5]: ' ); 78 | READLN( UNITID ); 79 | IF LENGTH( UNITID ) > 0 THEN 80 | DRIVENUM := ORD( UNITID[1] ) - ORD('0') 81 | ELSE 82 | EXIT( PROGRAM ); 83 | UNTIL DRIVENUM IN [4,5]; 84 | 85 | UNITREAD( DRIVENUM, BUFFER, SIZEOF(BUFFER), 6, 0 ); 86 | IDLENGTH := ORD( BUFFER[ 1, 6 ] ); 87 | 88 | IF (IDLENGTH > MAXIDLENGTH) OR (IDLENGTH <= 0) THEN 89 | WRITE( 'Illegal volume name. Do you want to copy anyway? ' ) 90 | 91 | ELSE 92 | BEGIN 93 | WRITE( 'Are you sure you want to zap the directory of ' ); 94 | FOR N := FIRSTIDCHAR TO (FIRSTIDCHAR - 1 + IDLENGTH) DO 95 | WRITE( BUFFER[ 1, N ] ); 96 | WRITE( ': {blocks 2-5}? ' ); 97 | END; 98 | 99 | IF YES THEN 100 | BEGIN 101 | IF ORD( BUFFER[ 1, 2 ] ) <> DUPDIRLASTBLK THEN 102 | BEGIN 103 | WRITELN( 'A duplicate directory has not been maintained on this disk. ' ); 104 | WRITE( ' Are you sure you want to copy the directory? ' ); 105 | IF NOT YES THEN 106 | EXIT( PROGRAM ) 107 | ELSE 108 | BEGIN 109 | BUFFER[ 1, 2 ] := CHR( DUPDIRLASTBLK ); 110 | BUFFER[ 1, 3 ] := CHR(0); 111 | UNITWRITE( DRIVENUM, BUFFER, SIZEOF(BUFFER), 6, 0 ); 112 | END; 113 | END; 114 | UNITWRITE( DRIVENUM, BUFFER, SIZEOF(BUFFER), 2, 0 ); 115 | WRITE( ' Directory copy is complete. ' ); 116 | END 117 | ELSE 118 | WRITE( ' Directory copy aborted. ' ); 119 | 120 | WRITE( 'Type to exit. ' ); 121 | READLN; 122 | 123 | END. 124 | -------------------------------------------------------------------------------- /copydupdir/meson.build: -------------------------------------------------------------------------------- 1 | copydupdir_code = custom_target( 2 | 'copydupdir_code', 3 | output : 'copydupdir.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /cross/klebsch-stage1.ini: -------------------------------------------------------------------------------- 1 | [host_machine] 2 | system = 'klebsch' 3 | cpu_family = '6502' 4 | cpu = '6502' 5 | endian = 'little' 6 | 7 | [binaries] 8 | c = 'false' 9 | cpp = 'false' 10 | ar = 'false' 11 | strip = 'false' 12 | exe_wrapper = 'false' 13 | 14 | [project options] 15 | disk_kb = 256 16 | -------------------------------------------------------------------------------- /diagnostic/meson.build: -------------------------------------------------------------------------------- 1 | diagnostic_system_pascal = custom_target( 2 | 'diagnostic_system_pascal', 3 | output : 'system.pascal', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /disassembler/meson.build: -------------------------------------------------------------------------------- 1 | disassembl_code = custom_target( 2 | 'disassembler_code', 3 | output : 'disassembl.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /disassembler/module.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2006, 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | all += disassembler/opcodes.ii.0; 31 | 32 | cascade disassembler/main.text = disassembler/opcodes.ii.0; 33 | 34 | disassembler/opcodes.ii.0: disassembler/opcodes.ii.0.txt 35 | { 36 | ucsdpsys_opcodes 37 | -e 38 | [resolve disassembler/opcodes.ii.0.txt] 39 | --arch\=pcode-le 40 | [target] 41 | ; 42 | } 43 | -------------------------------------------------------------------------------- /editor/meson.build: -------------------------------------------------------------------------------- 1 | editor_globals_text = fs.copyfile(globals_text) 2 | editor_vstamp_inc_text = fs.copyfile(vstamp_inc_text) 3 | 4 | editor_main_pas_code = custom_target( 5 | 'editor_main_pas_code', 6 | output : 'main.code', 7 | input : 'main.text', 8 | depends : [editor_globals_text, editor_vstamp_inc_text], 9 | command : pc_system_command, 10 | ) 11 | 12 | system_editor = custom_target( 13 | 'system_editor', 14 | output : 'system.editor', 15 | input : editor_main_pas_code, 16 | command : ar_system_command, 17 | build_by_default : true, 18 | ) 19 | -------------------------------------------------------------------------------- /editor/module.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | all += datadir/system.editor; 31 | 32 | datadir/system.editor: editor/main.code 33 | set shallow 34 | { 35 | cp [resolve [need]] [target]; 36 | } 37 | -------------------------------------------------------------------------------- /editor/out.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD PASCAL - Version I.5 3 | * Copyright (C) 1978, 1979 Regents of the University of California 4 | * All Rights Reserved 5 | * 6 | * Permission to use, copy, modify and distribute any part of UCSD 7 | * PASCAL solely authored by UC authors before June 1, 1979 for 8 | * educational, research and non-profit purposes, without fee, and 9 | * without a written agreement is hereby granted, provided that the 10 | * above copyright notice, this paragraph and the following three 11 | * paragraphs appear in all copies. 12 | * 13 | * Those desiring to incorporate UCSD PASCAL into commercial products or 14 | * use for commercial purposes should contact the Technology Transfer & 15 | * Intellectual Property Services, University of California, San Diego, 16 | * 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | * Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | * 19 | * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | * DAMAGE. 24 | * 25 | * THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | * OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | * MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | * EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | * THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | * OTHER RIGHTS. 33 | * 34 | * Case Number: SD1991-807 (2006) 35 | * http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | *) 37 | 38 | SEGMENT FUNCTION OUT: BOOLEAN; 39 | LABEL 1,2; 40 | VAR 41 | SAVE: PTRTYPE; 42 | I: INTEGER; 43 | BUF: PACKED ARRAY [0..1023] OF CHAR; 44 | FN: STRING; 45 | BEGIN 46 | OUT:=FALSE; 47 | REPEAT 48 | CLEARSCREEN; (* Dumb terminal patch *) 49 | SAVETOP:='>Quit:'; 50 | WRITELN(SAVETOP); 51 | WRITELN(' U(pdate the workfile and leave'); 52 | WRITELN(' E(xit without updating'); 53 | WRITELN(' R(eturn to the editor without updating'); 54 | WRITELN(' W(rite to a file name and return'); 55 | CH:=UCLC(GETCH); 56 | UNTIL CH IN ['U','E','R','W']; 57 | IF CH='R' THEN GOTO 2; 58 | IF CH='E' THEN BEGIN OUT:=TRUE; CLEARSCREEN; GOTO 2 END; 59 | CLOSE(THEFILE); 60 | IF CH='W' THEN 61 | BEGIN 62 | SAVE:=CURSOR; 63 | BLANKCRT(1); 64 | WRITE('Name of output file ( to return) -->'); 65 | READLN(FN); 66 | IF LENGTH(FN)=0 THEN GOTO 2; 67 | FOR I:=1 TO LENGTH(FN) DO FN[I]:=UCLC(FN[I]); 68 | IF ((POS('.TEXT',FN)<>LENGTH(FN)-4) OR (LENGTH(FN)<=4)) AND 69 | (FN[LENGTH(FN)]<>'.') THEN 70 | FN:=CONCAT(FN,'.TEXT'); 71 | IF FN[LENGTH(FN)]='.' THEN DELETE(FN,LENGTH(FN),1); 72 | END 73 | ELSE 74 | FN:='*SYSTEM.WRK.TEXT'; 75 | BLANKCRT(1); 76 | WRITE('Writing'); 77 | OPENNEW(THEFILE,FN); 78 | PAGEZERO.LASTUSED:=THEDATE; 79 | IF BLOCKWRITE(THEFILE,PAGEZERO,2) <> 2 THEN GOTO 1; 80 | WRITE('.'); 81 | CURSOR:=1; 82 | WHILE CURSOR < BUFCOUNT-1023 DO 83 | BEGIN 84 | I:=SCAN(-1022,=CHR(EOL),EBUF^[CURSOR+1022]); 85 | MOVELEFT(EBUF^[CURSOR],BUF,1023+I); 86 | FILLCHAR(BUF[1023+I],ABS(I)+1,CHR(0)); 87 | IF BLOCKWRITE(THEFILE,BUF,2) <> 2 THEN GOTO 1; 88 | CURSOR:=CURSOR+1023+I; 89 | WRITE('.'); 90 | END; 91 | IF CURSOR 2 THEN GOTO 1; WRITE('.') 96 | END; 97 | CLOSE(THEFILE,LOCK); 98 | WRITELN; 99 | WRITELN('Your file is ',BUFCOUNT,' bytes long.'); 100 | IF CH='U' THEN 101 | WITH USERINFO DO 102 | BEGIN 103 | SYMVID:=SYVID; SYMTID:='SYSTEM.WRK.TEXT'; GOTSYM:=TRUE; 104 | OPENOLD(THEFILE,'*SYSTEM.WRK.CODE'); CLOSE(THEFILE,PURGE); 105 | GOTCODE:=FALSE; CODETID:=''; OUT:=TRUE; 106 | END 107 | ELSE 108 | BEGIN 109 | WRITE('Do you want to E(xit from or R(eturn to the editor? '); 110 | REPEAT CH:=UCLC(GETCH) UNTIL CH IN ['E','R']; 111 | OUT:= CH='E'; 112 | CURSOR:=SAVE; (* QW returns to the editor *) 113 | END; 114 | GOTO 2; (* SORRY ABOUT THAT EDSGER *) 115 | 1: ERROR('Writing out the file',NONFATAL); 116 | 2:END; 117 | -------------------------------------------------------------------------------- /editor/putsyntax.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD PASCAL - Version I.5 3 | * Copyright (C) 1978, 1979 Regents of the University of California 4 | * All Rights Reserved 5 | * 6 | * Permission to use, copy, modify and distribute any part of UCSD 7 | * PASCAL solely authored by UC authors before June 1, 1979 for 8 | * educational, research and non-profit purposes, without fee, and 9 | * without a written agreement is hereby granted, provided that the 10 | * above copyright notice, this paragraph and the following three 11 | * paragraphs appear in all copies. 12 | * 13 | * Those desiring to incorporate UCSD PASCAL into commercial products or 14 | * use for commercial purposes should contact the Technology Transfer & 15 | * Intellectual Property Services, University of California, San Diego, 16 | * 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | * Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | * 19 | * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | * DAMAGE. 24 | * 25 | * THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | * OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | * MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | * EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | * THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | * OTHER RIGHTS. 33 | * 34 | * Case Number: SD1991-807 (2006) 35 | * http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | *) 37 | 38 | SEGMENT PROCEDURE PUTSYNTAX; 39 | VAR 40 | D0,D1,D2,BLK,PTR,COLON: INTEGER; 41 | T,C:PACKED ARRAY [0..2] OF CHAR; 42 | BUF:PACKED ARRAY [0..1023] OF CHAR; 43 | F: FILE; 44 | 45 | PROCEDURE PUTNUM; 46 | BEGIN 47 | MSG:='Syntax Error #'; PUTMSG; 48 | WRITE(USERINFO.ERRNUM,'. Type '); 49 | END; 50 | 51 | BEGIN (* putsyntax *) 52 | WITH USERINFO DO 53 | BEGIN 54 | OPENOLD(F,'*SYSTEM.SYNTAX'); 55 | IF IORESULT<>0 THEN PUTNUM 56 | ELSE 57 | BEGIN 58 | IF ERRNUM<=104 THEN BLK:=2 59 | ELSE 60 | IF ERRNUM<=126 THEN BLK:=4 61 | ELSE 62 | IF ERRNUM<=151 THEN BLK:=6 63 | ELSE 64 | IF ERRNUM<=185 THEN BLK:=8 65 | ELSE 66 | IF ERRNUM<=302 THEN BLK:=10 67 | ELSE BLK:=12; 68 | IF BLOCKREAD(F,BUF,2,BLK)<>2 THEN PUTNUM 69 | ELSE 70 | BEGIN 71 | IF BUF[0]=CHR(DLE) THEN PTR:=2 ELSE PTR:=0; 72 | D0:=ERRNUM DIV 100; (* convert error number to characters *) 73 | D1:=(ERRNUM-D0*100) DIV 10; 74 | D2:=ERRNUM MOD 10; 75 | T[0]:=CHR(D0+ORD('0')); T[1]:=CHR(D1+ORD('0')); 76 | T[2]:=CHR(D2+ORD('0')); 77 | REPEAT 78 | FILLCHAR(C,3,'0'); 79 | COLON:=SCAN(MAXCHAR,=':',BUF[PTR]); 80 | MOVELEFT(BUF[PTR],C[3-COLON],COLON); 81 | COLON:=COLON+PTR; 82 | PTR:=SCAN(MAXCHAR,=CHR(EOL),BUF[PTR])+PTR+3 83 | UNTIL (T=C) OR (BUF[PTR]=CHR(0)); 84 | IF (T<>C) AND (BUF[PTR]=CHR(0)) THEN PUTNUM 85 | ELSE 86 | BEGIN 87 | MOVELEFT(BUF[COLON+1],MSG[1],(PTR-COLON)-4); 88 | MSG[0]:=CHR(MIN(68,(PTR-COLON)-4)); (* R- required *) 89 | HOME; CLEARLINE(0); WRITE(MSG,'. Type '); 90 | END 91 | END 92 | END(* if ioresult<>0 *); 93 | SHOWCURSOR; 94 | REPEAT UNTIL GETCH=' '; 95 | ERRBLK:=0; ERRSYM:=0; ERRNUM:=0; (* Only yell once!!! *) 96 | END(* with userinfo *) 97 | END(* putsyntax *); 98 | -------------------------------------------------------------------------------- /editor/user.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD PASCAL - Version I.5 3 | * Copyright (C) 1978, 1979 Regents of the University of California 4 | * All Rights Reserved 5 | * 6 | * Permission to use, copy, modify and distribute any part of UCSD 7 | * PASCAL solely authored by UC authors before June 1, 1979 for 8 | * educational, research and non-profit purposes, without fee, and 9 | * without a written agreement is hereby granted, provided that the 10 | * above copyright notice, this paragraph and the following three 11 | * paragraphs appear in all copies. 12 | * 13 | * Those desiring to incorporate UCSD PASCAL into commercial products or 14 | * use for commercial purposes should contact the Technology Transfer & 15 | * Intellectual Property Services, University of California, San Diego, 16 | * 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | * Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | * 19 | * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | * DAMAGE. 24 | * 25 | * THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | * OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | * MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | * EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | * THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | * OTHER RIGHTS. 33 | * 34 | * Case Number: SD1991-807 (2006) 35 | * http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | *) 37 | 38 | PROCEDURE NEXTCOMMAND; 39 | BEGIN 40 | IF NEEDPROMPT THEN 41 | BEGIN 42 | PROMPTLINE:=COMPROMPT; {Made variable for screens of short width. MAB} 43 | PROMPT; 44 | NEEDPROMPT:=FALSE; 45 | SHOWCURSOR 46 | END; 47 | CH:=GETCH; 48 | COMMAND:=MAPTOCOMMAND(CH); 49 | END(* NEXTCOMMAND *); 50 | 51 | PROCEDURE COMMANDER; 52 | BEGIN 53 | INFINITY:=FALSE; 54 | IF COMMAND=SLASHC THEN 55 | BEGIN REPEATFACTOR:=1; INFINITY:=TRUE; NEXTCOMMAND END 56 | ELSE 57 | IF COMMAND=DIGIT THEN REPEATFACTOR:=GETNUM ELSE REPEATFACTOR:=1; 58 | CASE COMMAND OF 59 | ILLEGAL: BEGIN ERRWAIT; SHOWCURSOR; NEXTCOMMAND END; 60 | REVERSEC,FORWARDC: FIXDIRECTION; 61 | COPYC: COPY; 62 | DUMPC: DUMP; 63 | FINDC: FIND; 64 | INSERTC: INSERTIT; 65 | JUMPC: JUMP; 66 | LISTC: NEXTCOMMAND; (* NOT YET, DEPENDS ON TERAK PAN *) 67 | MACRODEFC: DEFMACRO; 68 | QUITC: ; (* EXIT HANDLED IN OUTER BLOCK *) 69 | REPLACEC: FIND; 70 | SETC: SETSTUFF; 71 | VERIFYC: VERIFY; 72 | XECUTEC: XMACRO; 73 | ZAPC: ZAPIT; 74 | EQUALC: BEGIN 75 | CURSOR:=LASTPAT; 76 | GETLEADING; 77 | CURSOR:=MAX(CURSOR,STUFFSTART); 78 | CENTERCURSOR(TRASH,MIDDLE,FALSE); 79 | SHOWCURSOR; NEXTCOMMAND 80 | END; 81 | ADJUSTC,DELETEC,PARAC,UP,DOWN,LEFT,RIGHT,ADVANCE,TAB,SPACE: MOVEIT 82 | END (* BIG LONG CASE STATEMENT *); 83 | END (* COMMANDER *); 84 | 85 | BEGIN (* Editcore *) 86 | NEXTCOMMAND; 87 | WHILE COMMAND<>QUITC DO COMMANDER 88 | END; 89 | -------------------------------------------------------------------------------- /edittort11/meson.build: -------------------------------------------------------------------------------- 1 | edittort11_code = custom_target( 2 | 'edittort11_code', 3 | output : 'edittort11.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /etc/Howto.conf.in: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * @configure_input@ 30 | */ 31 | 32 | /* 33 | * the name of the compiler to use 34 | */ 35 | c++ = @CXX@; 36 | c++_flags = @CXXFLAGS@; 37 | 38 | /* 39 | * prefix for installation path 40 | */ 41 | prefix = @prefix@ ; 42 | /* exec_prefix = @exec_prefix@ ; */ 43 | 44 | /* 45 | * Which yacc to use 46 | */ 47 | yacc = @YACC@; 48 | 49 | /* 50 | * extra libraries required for your system 51 | */ 52 | libs = @LIBS@; 53 | ld_flags = @LDFLAGS@; 54 | -------------------------------------------------------------------------------- /etc/README.man: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" UCSD p-System Operating System 3 | .\" Copyright (C) 2006, 2009, 2010 Peter Miller 4 | .\" 5 | .\" Redistribution and use in source and binary forms, with or without 6 | .\" modification, are permitted provided that the following conditions are met: 7 | .\" 8 | .\" * Redistributions of source code must retain the above copyright notice, 9 | .\" this list of conditions and the following disclaimer. 10 | .\" * Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" * Neither the name of the ucsd-psystem-os project nor the names of its 14 | .\" contributors may be used to endorse or promote products derived from 15 | .\" this software without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | .\" POSSIBILITY OF SUCH DAMAGE. 28 | .\" 29 | .TH "Read Me" ucsd-psystem-os ucsd-psystem-os "Reference Manual" 30 | .so version.so 31 | .hy 0 32 | .ad l 33 | .SH NAME 34 | ucsd-psystem-os \- UCSD p-System file system 35 | .XX "" "The README file" 36 | .SH DESCRIPTION 37 | The \f[I]ucsd-psystem-os\fP package is composed of several programs which 38 | collectively form the UCSD p-System operating system. 39 | .br 40 | .ne 1i 41 | .SH ARCHIVE SITE 42 | The latest version of 43 | .I ucsd-psystem-os 44 | is available on the Web from: 45 | .RS 4m 46 | .TS 47 | tab(;); 48 | l l s 49 | l l l. 50 | URL:;http://miller.emu.id.au/pmiller/ucsd-psystem-os/ 51 | File:;index.html;# the ucsd-psystem-os home page 52 | File:;ucsd-psystem-os-\*(v).tar.gz;# the complete source 53 | .TE 54 | .RE 55 | .br 56 | .ne 1i 57 | .SH BUILDING ucsd-psystem-os 58 | Full instructions for building \f[I]ucsd-psystem-os\fP may be found on 59 | the web at 60 | http://miller.emu.id.au/pmiller/ucsd-psystem-os/building.html 61 | .SH LICENSE 62 | See the LICENSE and LICENSE-UCSD files included in the source tarball. 63 | .SH MAINTAINER 64 | .TS 65 | tab(;); 66 | l r l. 67 | Peter Miller;E-Mail:;pmiller@opensource.org.au 68 | \f(CW/\e/\e*\fP;WWW:;http://miller.emu.id.au/pmiller/ 69 | .TE 70 | -------------------------------------------------------------------------------- /etc/arch-from-host.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # UCSD p-System Operating System 4 | # Copyright (C) 2010 Peter Miller 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, 10 | # this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the ucsd-psystem-os project nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | # POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | host="$1" 31 | host="`echo $host | tr A-Z a-z`" 32 | case "$host" in 33 | klebsch | kim* | apple* | 65*02*) 34 | echo 6502 35 | ;; 36 | 37 | pdp* | terak* | lsi*) 38 | echo pdp11 39 | ;; 40 | 41 | z80 | trs*) 42 | echo z80 43 | ;; 44 | 45 | *) 46 | echo "host \"$1\" unknown" 1>&2 47 | echo 6502 48 | exit 1 49 | ;; 50 | esac 51 | exit 0 52 | -------------------------------------------------------------------------------- /etc/autoconf.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * UCSD p-System Operating System 4 | * Copyright (C) 2006, 2010 Peter Miller 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of the ucsd-psystem-os project nor the names of its 15 | * contributors may be used to endorse or promote products derived from 16 | * this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 22 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | 32 | /* 33 | * This file is generated by autoconf. 34 | * It is architecture specific. 35 | * If it is not found (not cooked yet) the following 36 | * symbols will be undefined. 37 | * 38 | * Must be included *after* the search_list is defined. 39 | */ 40 | libs = ; 41 | #include-cooked-nowarn etc/Howto.conf 42 | if [not [defined prefix]] then 43 | prefix = /usr/local; 44 | if [not [defined exec_prefix]] then 45 | exec_prefix = [prefix]; 46 | if [not [defined yacc]] then 47 | yacc = yacc; 48 | if [not [defined libs]] then 49 | libs = ; 50 | if [not [defined cxx]] then 51 | cxx = ['if' [find_command g++] 'then' g++ 'else' c++]; 52 | 53 | 54 | configure: etc/configure.ac install-sh 55 | { 56 | if [not [exists install-sh]] then 57 | { 58 | /* 59 | * Cook says it is up-to-date, so it must be in the 60 | * baseline; autoconf needs it in the current directory. 61 | */ 62 | cp [resolve install-sh] . 63 | set clearstat; 64 | } 65 | autoconf [resolve etc/configure.ac] > [target]; 66 | chmod 755 [target]; 67 | } 68 | 69 | /* 70 | * The install-sh script can come from a huge range of places, depending 71 | * on what distribution you have installed (or whether you built it from 72 | * the tarball). 73 | */ 74 | loop install-sh-maybe = 75 | /usr/share/autoconf/install-sh 76 | [glob /usr/share/automake*/install-sh] 77 | /usr/local/share/autoconf/install-sh 78 | [glob /usr/local/share/automake*/install-sh] 79 | { 80 | if [exists [install-sh-maybe]] then 81 | { 82 | install-sh = [install-sh-maybe]; 83 | loopstop; 84 | } 85 | } 86 | if [not [install-sh]] then 87 | fail "Can't locate the \"install-sh\" script from GNU automake"; 88 | 89 | install-sh: [install-sh] 90 | { 91 | cp [need] [target]; 92 | chmod 755 [target]; 93 | } 94 | 95 | 96 | config.status: configure install-sh 97 | { 98 | if [not [exists install-sh]] then 99 | { 100 | /* 101 | * Cook says it is up-to-date, so it must be in the 102 | * baseline; autoconf needs it in the current directory. 103 | */ 104 | cp [resolve install-sh] . 105 | set clearstat; 106 | } 107 | ./[resolve configure] --cache-file\=/dev/null --verbose --no-create; 108 | } 109 | 110 | lib/config.h.in: etc/configure.ac 111 | { 112 | autoheader [resolve etc/configure.ac] > [target]; 113 | } 114 | 115 | 116 | %0%.h: %0%.h.in config.status 117 | single-thread conftest.subs 118 | { 119 | CONFIG_FILES\= CONFIG_HEADERS\=[target]\:[resolve %0%.h.in] 120 | [resolve ./config.status]; 121 | } 122 | 123 | %0%.cook: %0%.cook.in config.status 124 | single-thread conftest.subs 125 | { 126 | CONFIG_FILES\=[target]\:[resolve %0%.cook.in] CONFIG_HEADERS\= 127 | [resolve ./config.status]; 128 | sed -i "'s|${prefix}|[prefix]|g'" [target]; 129 | } 130 | 131 | %0%: %0%.in config.status 132 | single-thread conftest.subs 133 | { 134 | CONFIG_FILES\=[target]\:[resolve %0%.in] CONFIG_HEADERS\= 135 | [resolve ./config.status]; 136 | } 137 | 138 | /* Sigh */ 139 | cascade lib/common/vsnprintf.cc = lib/config.h; 140 | -------------------------------------------------------------------------------- /etc/change_log.man: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" UCSD p-System Operating System 3 | .\" Copyright (C) 2006, 2010 Peter Miller 4 | .\" 5 | .\" Redistribution and use in source and binary forms, with or without 6 | .\" modification, are permitted provided that the following conditions are met: 7 | .\" 8 | .\" * Redistributions of source code must retain the above copyright notice, 9 | .\" this list of conditions and the following disclaimer. 10 | .\" * Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" * Neither the name of the ucsd-psystem-os project nor the names of its 14 | .\" contributors may be used to endorse or promote products derived from 15 | .\" this software without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | .\" POSSIBILITY OF SUCH DAMAGE. 28 | .\" 29 | .TH "Change Log" ucsd-psystem-os ucsd-psystem-os "Change Log" 30 | .so version.so 31 | .hy 0 32 | .ad l 33 | .SH RELEASE NOTES 34 | This file details the various features and bug fixes of the various releases. 35 | .so new.so 36 | -------------------------------------------------------------------------------- /etc/check-tarball.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # UCSD p-System Operating System 4 | # Copyright (C) 2006, 2010 Peter Miller 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, 10 | # this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the ucsd-psystem-os project nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | # POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | 31 | # 32 | # where to get the distribution tarball from 33 | # 34 | case "$1" in 35 | /*) 36 | src_tgz=$1 37 | ;; 38 | *) 39 | src_tgz=`pwd`/$1 40 | ;; 41 | esac 42 | 43 | set -e 44 | set -x 45 | rm -rf check-tarball-tmp 46 | mkdir check-tarball-tmp 47 | cd check-tarball-tmp 48 | 49 | tar xzf $src_tgz 50 | 51 | cd ucsd-psystem-os-* 52 | 53 | # condifure the project 54 | ./configure || exit 1 55 | 56 | # 57 | # Build the executables. 58 | # 59 | make || exit 1 60 | 61 | du -s -h 62 | 63 | # 64 | # Run all of the tests. 65 | # 66 | ##tests? what tests? 67 | ##make sure 68 | 69 | exit 0 70 | -------------------------------------------------------------------------------- /etc/host-disk-kb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # UCSD p-System Operating System 4 | # Copyright (C) 2010 Peter Miller 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, 10 | # this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the ucsd-psystem-os project nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | # POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | host="$1" 31 | host="`echo $host | tr A-Z a-z`" 32 | case "$host" in 33 | apple*) 34 | echo 140 35 | ;; 36 | pdp11* | terak* | lsi*) 37 | echo 800 38 | ;; 39 | *) 40 | echo 256 41 | ;; 42 | esac 43 | exit 0 44 | -------------------------------------------------------------------------------- /etc/metrics.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2006, 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | all += metrics.targets ; 31 | 32 | metrics_include_file = etc/proj_metric.so; 33 | 34 | /* 35 | * These are the files to construct to that Aegis can read them at 36 | * integration pass time. 37 | */ 38 | metrics.targets = [addsuffix ",S" [source_files]]; 39 | 40 | metrics.targets: [metrics.targets]; 41 | 42 | %0%,S: %0% 43 | set nocascade 44 | { 45 | aemeasure [resolve %0%] [target]; 46 | } 47 | -------------------------------------------------------------------------------- /etc/mkfsdisk.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | 3 | """UCSD p-System volume creation wrapper 4 | 5 | Combines creating disk images with population. 6 | """ 7 | 8 | import sys 9 | import os 10 | import subprocess 11 | from pathlib import Path 12 | 13 | 14 | def main(args=sys.argv[1:]): 15 | mkfs = os.environ.get('MKFS', 'ucsdpsys_mkfs') 16 | disk = os.environ.get('DISK', 'ucsdpsys_disk') 17 | mkfs_arch = os.environ.get('MKFS_ARCH', None) 18 | mkfs_size = os.environ.get('MKFS_SIZE', None) 19 | 20 | outfile, *infiles = args 21 | 22 | mkfs_command = [mkfs, f'--label={Path(outfile).stem}'] 23 | if mkfs_arch is not None: 24 | mkfs_command.append(f'--arch={mkfs_arch}') 25 | if mkfs_size is not None: 26 | mkfs_command.append(f'-B{mkfs_size}') 27 | mkfs_command.append(outfile) 28 | subprocess.run(mkfs_command, check=True) 29 | 30 | disk_put_command = [disk, '-f', outfile, '--put'] + infiles 31 | subprocess.run(disk_put_command, check=True) 32 | 33 | disk_crunch_command = [disk, '-f', outfile, '--crunch', '--list', 34 | '--sort=name'] 35 | subprocess.run(disk_crunch_command, check=True) 36 | 37 | 38 | if __name__ == '__main__': 39 | main() 40 | -------------------------------------------------------------------------------- /etc/new.1.0.so: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" UCSD p-System Operating System 3 | .\" Copyright (C) 2006, 2010 Peter Miller 4 | .\" 5 | .\" Redistribution and use in source and binary forms, with or without 6 | .\" modification, are permitted provided that the following conditions are met: 7 | .\" 8 | .\" * Redistributions of source code must retain the above copyright notice, 9 | .\" this list of conditions and the following disclaimer. 10 | .\" * Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" * Neither the name of the ucsd-psystem-os project nor the names of its 14 | .\" contributors may be used to endorse or promote products derived from 15 | .\" this software without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | .\" POSSIBILITY OF SUCH DAMAGE. 28 | .\" 29 | .\" ------------------------------------------------------------------------ 30 | .TP 2n 31 | .if n * 32 | .if t \(bu 33 | The project is far from finished. 34 | At present the filter works, the editor works, and the compiler works. 35 | .TP 2n 36 | .if n * 37 | .if t \(bu 38 | The three-stage boot process described in the \f[CW]Makefile\fP 39 | is only implements the first of the three stages. 40 | .TP 2n 41 | .if n * 42 | .if t \(bu 43 | Not all of the II.0 sources are present yet. 44 | .\" ------------------------------------------------------------------------ 45 | .\" Add new entries above this line. 46 | .SS Version 1.0 (2006-May-12) 47 | The first change set of the project. 48 | -------------------------------------------------------------------------------- /etc/new.1.1.so: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" UCSD p-System Operating System 3 | .\" Copyright (C) 2010 Peter Miller 4 | .\" 5 | .\" Redistribution and use in source and binary forms, with or without 6 | .\" modification, are permitted provided that the following conditions are met: 7 | .\" 8 | .\" * Redistributions of source code must retain the above copyright notice, 9 | .\" this list of conditions and the following disclaimer. 10 | .\" * Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" * Neither the name of the ucsd-psystem-os project nor the names of its 14 | .\" contributors may be used to endorse or promote products derived from 15 | .\" this software without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | .\" POSSIBILITY OF SUCH DAMAGE. 28 | .\" 29 | .\" ------------------------------------------------------------------------ 30 | .TP 2n 31 | .if n * 32 | .if t \(bu 33 | .\" Change 110, 111 34 | The APPLESTU, TRANSCEN, TURTLEGR units (Klebsch glue) have been added. 35 | This means that programs that use these intrinsic units will now operate 36 | correctly. 37 | .TP 2n 38 | .if n * 39 | .if t \(bu 40 | .\" Change 107 41 | The build system now understands how to link libraries, allowing the system 42 | library units to be assembled into the \f[CW]SYSTEM.LIBRARY\fP file. 43 | .TP 2n 44 | .if n * 45 | .if t \(bu 46 | .\" Change 109 47 | Several syntax errors have been fixed in the XREF program, most 48 | involving missing (implicit zero) procedure parameters. 49 | .TP 2n 50 | .if n * 51 | .if t \(bu 52 | .\" Change 105 53 | Source code has been added for the CALC, EDITTORT11, RT11TOEDIT 54 | and XREF utilities. 55 | .\" ------------------------------------------------------------------------ 56 | .\" Add new entries above this line. 57 | .SS Version 1.1 (2010-Jun-21) 58 | -------------------------------------------------------------------------------- /etc/new.1.2.so: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" UCSD p-System Operating System 3 | .\" Copyright (C) 2010, 2011 Peter Miller 4 | .\" 5 | .\" Redistribution and use in source and binary forms, with or without 6 | .\" modification, are permitted provided that the following conditions are met: 7 | .\" 8 | .\" * Redistributions of source code must retain the above copyright notice, 9 | .\" this list of conditions and the following disclaimer. 10 | .\" * Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" * Neither the name of the ucsd-psystem-os project nor the names of its 14 | .\" contributors may be used to endorse or promote products derived from 15 | .\" this software without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | .\" POSSIBILITY OF SUCH DAMAGE. 28 | .\" 29 | .\" ------------------------------------------------------------------------ 30 | .TP 2n 31 | .if n * 32 | .if t \(bu 33 | .\" Change 101 34 | .\" Change 103 35 | .\" Change 108 36 | The project web site has been improved. 37 | .TP 2n 38 | .if n * 39 | .if t \(bu 40 | .\" Change 107 41 | A bug has been fixed in the description of how to use the 42 | \f[I]ucsdpsys\fP(1) command, it now launches the system correctly. 43 | .TP 2n 44 | .if n * 45 | .if t \(bu 46 | .\" Change 102 47 | All of the segkind values that appear in the source code as magic 48 | numbers (presumably to make the compiler small enough to compile 49 | itself) are now accompanied by a comment indicating their 50 | symbolic equivalent. 51 | .\" ------------------------------------------------------------------------ 52 | .\" Add new entries above this line. 53 | .SS Version 1.2 (2010-Aug-28) 54 | -------------------------------------------------------------------------------- /etc/new.1.3.so: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" UCSD p-System Operating System 3 | .\" Copyright (C) 2011 Peter Miller 4 | .\" 5 | .\" Redistribution and use in source and binary forms, with or without 6 | .\" modification, are permitted provided that the following conditions are met: 7 | .\" 8 | .\" * Redistributions of source code must retain the above copyright notice, 9 | .\" this list of conditions and the following disclaimer. 10 | .\" * Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" * Neither the name of the ucsd-psystem-os project nor the names of its 14 | .\" contributors may be used to endorse or promote products derived from 15 | .\" this software without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | .\" POSSIBILITY OF SUCH DAMAGE. 28 | .\" 29 | .\" ------------------------------------------------------------------------ 30 | .\" 31 | .\" you can create the initial cut of this file using the 32 | .\" aereport -f /usr/local/share/aegis/report/chan_so.rpt \ 33 | .\" -p ucsd-psystem-os.1 -c 3 -unf 34 | .\" command, and then editing it to be more appropriate. 35 | .\" 36 | .\" ------------------------------------------------------------------------ 37 | .\" .TP 2n 38 | .\" .if n * 39 | .\" .if t \(bu 40 | .\" .\" Change N 41 | .\" ------------------------------------------------------------------------ 42 | .\" Add new entries above this line. 43 | .SS Version 1.3 (2011-May-17) 44 | -------------------------------------------------------------------------------- /etc/new.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # UCSD p-System Operating System 4 | # Copyright (C) 2006, 2010 Peter Miller 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, 10 | # this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the ucsd-psystem-os project nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | # POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | sortflag= 31 | if test "$1" = "-r"; then 32 | sortflag=r 33 | shift 34 | fi 35 | echo $* | 36 | tr ' ' '\12' | 37 | sort -t. +1n$sortflag -2 +2n$sortflag -3 +3n$sortflag -5 | 38 | while read f 39 | do 40 | echo ".br" 41 | echo ".ne 3i" 42 | echo ".so $f" 43 | done 44 | exit 0 45 | -------------------------------------------------------------------------------- /etc/new.so: -------------------------------------------------------------------------------- 1 | .br 2 | .ne 3i 3 | .so new.1.3.so 4 | .br 5 | .ne 3i 6 | .so new.1.2.so 7 | .br 8 | .ne 3i 9 | .so new.1.1.so 10 | .br 11 | .ne 3i 12 | .so new.1.0.so 13 | -------------------------------------------------------------------------------- /etc/page-list.awk: -------------------------------------------------------------------------------- 1 | #!/bin/awk -f 2 | # 3 | # UCSD p-System Operating System 4 | # Copyright (C) 2006, 2010 Peter Miller 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, 10 | # this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the ucsd-psystem-os project nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | # POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | function output_end() 31 | { 32 | if (start == 0) 33 | return; 34 | if (middle != 0) 35 | printf(",") 36 | middle = 1 37 | printf("%d", start); 38 | if (start != finish) 39 | printf("-%d", finish); 40 | start = 0; 41 | finish = 0; 42 | } 43 | 44 | function output(n) 45 | { 46 | if (start == 0) 47 | { 48 | start = n 49 | finish = n 50 | return 51 | } 52 | if (n == finish + 1) 53 | { 54 | finish = n; 55 | return 56 | } 57 | output_end(); 58 | start = n; 59 | finish = n; 60 | } 61 | 62 | function output_even() 63 | { 64 | if ((page[finish] % 2) != 0) 65 | { 66 | output_end(); 67 | printf(",_"); 68 | } 69 | } 70 | 71 | /Page:/ { 72 | page[$3] = $2 73 | if ($3 > max) 74 | max = $3 75 | } 76 | END { 77 | output(1); 78 | output(2); 79 | numtoc = 0 80 | for (j = 3; j <= max; ++j) 81 | { 82 | if (page[j] > 1000) 83 | { 84 | output(j); 85 | numtoc++ 86 | } 87 | } 88 | output_even(); 89 | for (j = 3; j <= max; ++j) 90 | { 91 | if (page[j] < 1000) 92 | output(j); 93 | } 94 | output_even(); 95 | output_end(); 96 | printf("\n"); 97 | } 98 | -------------------------------------------------------------------------------- /etc/ppa-upload.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # UCSD p-System Operating System 4 | # Copyright (C) 2011 Peter Miller 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, 10 | # this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the ucsd-psystem-os project nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | # POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | set -e 31 | 32 | project=ucsd-psystem-os 33 | wwwdir=archive 34 | 35 | AEGIS_PROJECT=${project}.cur 36 | export AEGIS_PROJECT 37 | 38 | RELEASES="$*" 39 | if [ -z "$RELEASES" ] 40 | then 41 | RELEASES="`cat /home/archives/ubuntu.release.names`" 42 | if [ -z "$RELEASES" ] 43 | then 44 | RELEASES="hardy karmic lucid maverick natty" 45 | fi 46 | fi 47 | 48 | PPA=ppa:pmiller-opensource/ppa 49 | 50 | #find the project baseline 51 | bl=`aegis -cd -bl` 52 | dir=$bl/$wwwdir 53 | f=`( cd $dir && ls *.tar.gz ) | tail -1` 54 | if [ -z "$f" ] 55 | then 56 | echo "can't find tarball" 1>&2 57 | exit 1 58 | fi 59 | tgz=$dir/$f 60 | 61 | tdir=/tmp/${project}-ppa-$$ 62 | 63 | for release in $RELEASES 64 | do 65 | cd /tmp 66 | rm -rf $tdir 67 | mkdir $tdir 68 | cd $tdir 69 | tar xzf $tgz 70 | cd ${project}-* 71 | 72 | PACKAGE=`head -1 debian/changelog | awk '{print $1}'` 73 | VERSION=`head -1 debian/changelog | awk '{print $2}' | 74 | sed -r -e 's/^\(//;s/\)$//'` 75 | 76 | sed -i -r -e "1s/\) [^;]+; /~${release}) ${release}; /" debian/changelog 77 | head -1 debian/changelog 78 | dpkg-buildpackage -S -sa 79 | ls -lho .. 80 | dput $PPA ../${PACKAGE}_${VERSION}~${release}_source.changes 81 | 82 | cd /tmp 83 | rm -rf $tdir 84 | done 85 | exit 0 86 | 87 | # vim:ts=8:sw=4:et 88 | -------------------------------------------------------------------------------- /etc/ref-index.so: -------------------------------------------------------------------------------- 1 | .hy 0 2 | .de TH 3 | .. 4 | .TS H 5 | l r lw(2.5i) lw(2.5i). 6 | .TH 7 | .TE 8 | .ad b 9 | -------------------------------------------------------------------------------- /etc/ref-parts.so: -------------------------------------------------------------------------------- 1 | .so man/man1/ucsdpsys_os_license_bsd.1 2 | .so man/man1/ucsdpsys_os_license_ucsd.1 3 | -------------------------------------------------------------------------------- /etc/ref-ptx.ignore: -------------------------------------------------------------------------------- 1 | # 2 | # UCSD p-System Operating System 3 | # Copyright (C) 2006, 2010 Peter Miller 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the ucsd-psystem-os project nor the names of its 14 | # contributors may be used to endorse or promote products derived from 15 | # this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | # POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | a 30 | as 31 | and 32 | be 33 | by 34 | of 35 | the 36 | to 37 | -------------------------------------------------------------------------------- /etc/ref-ptx.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # UCSD p-System Operating System 4 | # Copyright (C) 2006, 2010 Peter Miller 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, 10 | # this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the ucsd-psystem-os project nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | # POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | echo $* | 31 | tr ' ' '\12' | 32 | sort | 33 | while read f 34 | do 35 | echo .so $f 36 | done 37 | 38 | exit 0 39 | -------------------------------------------------------------------------------- /etc/ref-ptx1.awk: -------------------------------------------------------------------------------- 1 | # 2 | # UCSD p-System Operating System 3 | # Copyright (C) 2006, 2010 Peter Miller 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the ucsd-psystem-os project nor the names of its 14 | # contributors may be used to endorse or promote products derived from 15 | # this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | # POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | function getc() 30 | { 31 | getc_tmp = substr(getc_buf, getc_pos, 1) 32 | if (getc_tmp != "") 33 | ++getc_pos 34 | return getc_tmp 35 | } 36 | 37 | BEGIN { 38 | th_name = "none" 39 | th_section = "none" 40 | active = 0 41 | } 42 | /^\.TH/ { 43 | # watch out for the quotes 44 | getc_buf = $0 45 | getc_pos = 4 46 | argc = 0 47 | for (;;) 48 | { 49 | c = getc() 50 | while (c == " " || c == "\t") 51 | c = getc() 52 | if (c == "") 53 | break 54 | quoted = 0 55 | arg = "" 56 | for (;;) 57 | { 58 | if (c == "\"") 59 | quoted = !quoted 60 | else if (c == "") 61 | break 62 | else if (!quoted && (c == " " || c == "\t")) 63 | break 64 | else 65 | arg = arg c 66 | c = getc() 67 | } 68 | argv[++argc] = arg 69 | } 70 | 71 | # th_name = argv[1] 72 | # gsub(/\\\*\(n\)/, "ucsd-psystem-os", th_name) 73 | # th_section = argv[2] 74 | th_name = FILENAME 75 | sub(/^.*\//, "", th_name) 76 | sub(/\.[0-9]$/, "", th_name) 77 | th_section = FILENAME 78 | sub(/^.*\./, "", th_section) 79 | active = 0 80 | next 81 | } 82 | /^\.SH/ { 83 | active = ($2 == "NAME") 84 | next 85 | } 86 | /^['.]\\"/ { 87 | # ignore comments 88 | next 89 | } 90 | /^['.]XX/ { 91 | # ignore indexing 92 | next 93 | } 94 | /^['.]/ { 95 | if (active) 96 | { 97 | sub(/^.[a-zA-Z][a-zA-Z]*[ ]*/, "") 98 | print th_name "(" th_section ") " $0 99 | } 100 | next 101 | } 102 | { 103 | if (active) 104 | { 105 | gsub(/ /, " ") # Translate tabs to spaces 106 | gsub(/__*/, " ") # Collapse underscores 107 | gsub(/ +/, " ") # Collapse spaces 108 | gsub(/ *, */, ", ") # Fix comma spacings 109 | sub(/^ /, "") # Kill initial spaces 110 | sub(/ $/, "") # Kill trailing spaces 111 | gsub(/\\f\(../, "") # Kill font changes 112 | gsub(/\\f./, "") # Kill font changes 113 | gsub(/\\s[-+0-9]*/, "") # Kill size changes 114 | gsub(/\\&/, "") # Kill \& 115 | gsub(/\\\((ru|ul)/, "_") # Translate 116 | gsub(/\\\((mi|hy|em)/, "-") # Translate 117 | gsub(/\\\*\(n\)/, "ucsd-psystem-os") 118 | gsub(/\\\*\(../, "") # Kill troff strings 119 | gsub(/\\/, "") # Kill all backslashes 120 | print th_name "(" th_section ") " $0 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /etc/ref-ptx2.awk: -------------------------------------------------------------------------------- 1 | # 2 | # UCSD p-System Operating System 3 | # Copyright (C) 2006, 2010 Peter Miller 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the ucsd-psystem-os project nor the names of its 14 | # contributors may be used to endorse or promote products derived from 15 | # this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | # POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | BEGIN { 30 | print ".hy 0" 31 | print ".de TH" 32 | print ".." 33 | print ".TS H" 34 | print "l r lw(2.5i) lw(2.5i)." 35 | print ".TH" 36 | } 37 | { 38 | print $10 "\t\\*[Page*Of*" $10 "]\tT{" 39 | print ".ad r" 40 | print $4 41 | print "T}\tT{" 42 | print ".ad l" 43 | print $6 44 | print "T}" 45 | } 46 | END { 47 | print ".TE" 48 | print ".ad b" 49 | } 50 | -------------------------------------------------------------------------------- /etc/ref-toc.so: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" UCSD p-System Operating System 3 | .\" Copyright (C) 2006, 2010 Peter Miller 4 | .\" 5 | .\" Redistribution and use in source and binary forms, with or without 6 | .\" modification, are permitted provided that the following conditions are met: 7 | .\" 8 | .\" * Redistributions of source code must retain the above copyright notice, 9 | .\" this list of conditions and the following disclaimer. 10 | .\" * Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" * Neither the name of the ucsd-psystem-os project nor the names of its 14 | .\" contributors may be used to endorse or promote products derived from 15 | .\" this software without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | .\" POSSIBILITY OF SUCH DAMAGE. 28 | .\" 29 | .\" ---------- XX ----------------------------------------------------------- 30 | .\" 31 | .\" The XX macro accumulates table of contents entries. It takes two 32 | .\" arguments, first is the page title, the second is the page 33 | .\" description. The current page number in the \n% register is 34 | .\" consulted to obtain the page number. 35 | .\" 36 | .de XX 37 | .ds Page*Of*\\$1 \\n% 38 | .da toc*div 39 | .ev h 40 | .ds toc*num \\n% 41 | .ll -8n 42 | .in 0 43 | \\$1\\t\\$2 44 | \\a\\t\\*[toc*num] 45 | .br 46 | .ll +8n 47 | .rm toc*num 48 | .ev 49 | .di 50 | .. 51 | .\" ---------- TC ----------------------------------------------------------- 52 | .\" 53 | .\" The TC macro prints the table of contents collected by uses of the 54 | .\" XX macro. 55 | .\" 56 | .de TC 57 | .nf 58 | .char \[toc*leader-char] .\h'1m' 59 | .lc \[toc*leader-char] 60 | .ta 2i (u;\\n[.l]-\\n[.i]-\w'000') (u;\\n[.l]-\\n[.i])R 61 | .toc*div 62 | .fi 63 | .. 64 | -------------------------------------------------------------------------------- /etc/stage1.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010, 2011 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | stage1 = 31 | stage1/basic.code 32 | stage1/binder.code 33 | stage1/bios.diag.code 34 | stage1/calc.code 35 | stage1/compiler.code 36 | stage1/copydupdir.code 37 | stage1/diagnostic.code 38 | stage1/disassembler.code 39 | stage1/editor.code 40 | stage1/edittort11.code 41 | stage1/execerr.code 42 | stage1/filer.code 43 | stage1/libmap.code 44 | stage1/librarian.code 45 | stage1/linker.code 46 | stage1/markdupdir.code 47 | stage1/radix.code 48 | stage1/rt11toedit.code 49 | stage1/setup.code 50 | stage1/system.code 51 | stage1/system.miscinfo 52 | stage1/system.syntax 53 | stage1/yaloe.code 54 | 55 | /* 56 | * These codefile are all glued together by the linker to produce 57 | * the SYSTEM.LIBRARY library file 58 | */ 59 | stage1/pascalio.code 60 | ; 61 | 62 | stage1 += 63 | stage1/diagnostic.vol 64 | stage1/diagnostic.check 65 | stage1/system.vol 66 | ; 67 | stage1: [stage1]; 68 | all += stage1; 69 | 70 | function defined-or-null = 71 | { 72 | if [defined [ @1 ]] then 73 | return [[ @1 ]]; 74 | } 75 | 76 | stage1/compiler.code_flags = -fignore-undefined-segment-zero; 77 | stage1/filer.code_flags = -fignore-undefined-segment-zero; 78 | stage1/yaloe.code_flags = -fignore-undefined-segment-zero; 79 | stage1/pascalio.code_flags = -fignore-undefined-segment-zero; 80 | 81 | stage1/%.code: %/main.text 82 | /usr/local/bin/ucsdpsys_compile 83 | set shallow 84 | { 85 | ucsdpsys_compile 86 | -Wshadow\=false 87 | [defined-or-null [target]_flags] 88 | [prepost "-I" "/%" [search_list]] 89 | [resolve %/main.text] 90 | -o [target] 91 | ; 92 | } 93 | 94 | stage1/diagnostic.vol: stage1/diagnostic.code 95 | set shallow 96 | { 97 | ucsdpsys_mkfs --label\=diagnostic [target]; 98 | ucsdpsys_disk -f [target] --put 99 | system.pascal\=[resolve stage1/diagnostic.code]; 100 | ucsdpsys_disk -f [target] --crunch --list; 101 | } 102 | 103 | 104 | stage1/system.vol: 105 | stage1/basic.code 106 | stage1/binder.code 107 | stage1/copydupdir.code 108 | stage1/disassembler.code 109 | stage1/execerr.code 110 | stage1/libmap.code 111 | stage1/librarian.code 112 | stage1/linker.code 113 | stage1/markdupdir.code 114 | stage1/pascalio.code 115 | stage1/radix.code 116 | stage1/setup.code 117 | /* stage1/system.assmbler */ 118 | stage1/system.compiler 119 | stage1/system.editor 120 | stage1/system.filer 121 | stage1/system.miscinfo 122 | stage1/system.pascal 123 | { 124 | ucsdpsys_mkfs -B 256 --label\=system [target]; 125 | ucsdpsys_disk -f [target] --put [resolve [need] ]; 126 | ucsdpsys_disk -f [target] --crunch --list; 127 | } 128 | 129 | stage1/system.pascal: stage1/system.code 130 | { 131 | /* 132 | * We need a non-pattern recipe for the system, because we do not 133 | * delete the system segments as we do for the other tools. 134 | */ 135 | cp [resolve stage1/system.code] [target]; 136 | } 137 | 138 | stage1/system.%: stage1/%.code 139 | { 140 | ucsdpsys_librarian 141 | -o [target] 142 | -f [resolve stage1/%.code] 143 | --remove-system-segments 144 | ; 145 | } 146 | 147 | stage1/diagnostic.check: stage1/diagnostic.vol 148 | { 149 | ucsdpsys_vm -b- -f [resolve stage1/diagnostic.vol] > [target]; 150 | 151 | cat [target]; 152 | if [collect grep -c 'found.*error' stage1/diagnostic.check || true] then 153 | fail Diagnostic Error; 154 | } 155 | 156 | stage1/system.miscinfo: host/klebsch/miscinfo.text 157 | { 158 | ucsdpsys_setup -e [resolve host/klebsch/miscinfo.text] [target]; 159 | } 160 | 161 | 162 | stage1/system.library: stage1/pascalio.code 163 | { 164 | ucsdpsys_librarian 165 | --create\=[target] 166 | --copy\=[resolve stage1/pascalio.code] --segment PASCALIO\=31 167 | ; 168 | ucsdpsys_libmap [target]; 169 | } 170 | 171 | stage1/system.syntax: compiler/error-messages.text 172 | { 173 | cp [resolve compiler/error-messages.text] [target]; 174 | } 175 | -------------------------------------------------------------------------------- /etc/tags.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | if [find_command ctags] then 31 | { 32 | /* 33 | * There are three different versions of these commands, 34 | * and they take completely different command line options. We 35 | * assume minimal posix syntax if nothing better is available. 36 | * (What were they thinking? Were they even thinking?) 37 | */ 38 | ctags-variant = posix; 39 | 40 | /* 41 | * The '|| true' is needed because if ctags fails the build stops. 42 | */ 43 | ctags-version = [collect ctags --version || true]; 44 | if [in Exuberant [ctags-version]] then 45 | { 46 | ctags-variant = exuberant; 47 | } 48 | else 49 | if [in Emacs [ctags-version]] then 50 | { 51 | ctags-variant = emacs; 52 | } 53 | 54 | all += tags; 55 | 56 | if [find_command etags] then 57 | { 58 | etags = etags; 59 | all += TAGS; 60 | } 61 | 62 | /* 63 | * xargs can invoke ctags/etags more than once if the underling 64 | * shell does not handle so much arguments. In order to not 65 | * truncate the target the '-a' options must be used. It is posix 66 | * compliant and should be supported by different ctags variant. 67 | */ 68 | ctags-opts = -a; 69 | 70 | if [in posix [ctags-variant]] then 71 | ctags-opts += -f; 72 | 73 | if [in exuberant [ctags-variant]] then 74 | { 75 | ctags-opts += '--sort=foldcase' '--langmap=pascal:+.text'; 76 | ctags-opts += --c-types\=+px -f; 77 | etags = ctags -e; 78 | all += TAGS; 79 | } 80 | 81 | /* 82 | * The (GNU) Emacs variant of ctags (based an Exuberant) use -o 83 | * to set the output file name. 84 | */ 85 | if [in emacs [ctags-variant]] then 86 | ctags-opts += --declarations --defines --globals --members --typedefs 87 | /* --no-warn (the man page says the --no-warn option exists, 88 | but is doesn't, really) */ 89 | -o 90 | ; 91 | } 92 | 93 | tags: [change_source_files] 94 | set shallow no-cascade 95 | { 96 | xargs ctags [ctags-opts] [target]; 97 | data 98 | [unsplit "\n" [resolve [source_files]]] 99 | dataend 100 | } 101 | 102 | TAGS: [change_source_files] 103 | set shallow no-cascade 104 | { 105 | xargs [etags] [ctags-opts] [target]; 106 | data 107 | [unsplit "\n" [resolve [source_files]]] 108 | dataend 109 | } 110 | -------------------------------------------------------------------------------- /etc/ucsdpsys-wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # UCSD p-System Operating System 4 | # Copyright (C) 2011 Peter Miller 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright notice, 10 | # this list of conditions and the following disclaimer. 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in the 13 | # documentation and/or other materials provided with the distribution. 14 | # * Neither the name of the ucsd-psystem-os project nor the names of its 15 | # contributors may be used to endorse or promote products derived from 16 | # this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | # POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | set -x 31 | ucsdpsys "$@" > LOG 2>&1 32 | es=$? 33 | cat LOG 34 | if test "$es" -ne 0 35 | then 36 | exit $es 37 | fi 38 | if grep 'error.*' LOG > /dev/null 39 | then 40 | exit 1 41 | fi 42 | echo No errors 43 | exit 0 44 | -------------------------------------------------------------------------------- /etc/version.so: -------------------------------------------------------------------------------- 1 | .ds V) 1.3.D001 2 | .ds v) 1.3 3 | .ds Y) 2006, 2009, 2010, 2011 4 | -------------------------------------------------------------------------------- /etc/vstamp.asm.text: -------------------------------------------------------------------------------- 1 | project_url .equ 'http://miller.emu.id.au/pmiller/ucsd-psystem-os/' 2 | version_stamp .equ '1.3.D001' 3 | -------------------------------------------------------------------------------- /etc/vstamp.inc.text: -------------------------------------------------------------------------------- 1 | const 2 | project_url = 'http://miller.emu.id.au/pmiller/ucsd-psystem-os/'; 3 | version_stamp = '1.3.D001'; 4 | -------------------------------------------------------------------------------- /execerr/meson.build: -------------------------------------------------------------------------------- 1 | execerr_code = custom_target( 2 | 'execerr_code', 3 | output : 'execerr.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /filer/main.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD PASCAL - Version I.5 3 | * Copyright (C) 1978, 1979 Regents of the University of California 4 | * All Rights Reserved 5 | * 6 | * Permission to use, copy, modify and distribute any part of UCSD 7 | * PASCAL solely authored by UC authors before June 1, 1979 for 8 | * educational, research and non-profit purposes, without fee, and 9 | * without a written agreement is hereby granted, provided that the 10 | * above copyright notice, this paragraph and the following three 11 | * paragraphs appear in all copies. 12 | * 13 | * Those desiring to incorporate UCSD PASCAL into commercial products or 14 | * use for commercial purposes should contact the Technology Transfer & 15 | * Intellectual Property Services, University of California, San Diego, 16 | * 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | * Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | * 19 | * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | * DAMAGE. 24 | * 25 | * THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | * OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | * MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | * EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | * THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | * OTHER RIGHTS. 33 | * 34 | * Case Number: SD1991-807 (2006) 35 | * http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | *) 37 | 38 | {$S+} 39 | {$I globals.text} 40 | {$I filer.vars.text} 41 | {$I filer.a.text} 42 | {$I filer.b.text} 43 | {$I filer.c.text} 44 | {$I filer.d.text} 45 | {$I filer.e.text} 46 | -------------------------------------------------------------------------------- /filer/meson.build: -------------------------------------------------------------------------------- 1 | filer_globals_text = fs.copyfile(globals_text) 2 | filer_vstamp_inc_text = fs.copyfile(vstamp_inc_text) 3 | 4 | filer_main_pas_code = custom_target( 5 | 'filer_main_pas_code', 6 | output : 'main.code', 7 | input : 'main.text', 8 | depends : [filer_globals_text, filer_vstamp_inc_text], 9 | command : pc_system_command, 10 | ) 11 | 12 | system_filer = custom_target( 13 | 'system_filer', 14 | output : 'system.filer', 15 | input : filer_main_pas_code, 16 | command : ar_system_command, 17 | build_by_default : true, 18 | ) 19 | -------------------------------------------------------------------------------- /filer/module.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | all += datadir/system.filer; 31 | 32 | datadir/system.filer: filer/main.code 33 | set shallow 34 | { 35 | cp [resolve [need]] [target]; 36 | } 37 | 38 | 39 | filer/globals.text: system/globals.text 40 | { 41 | cp [resolve [need]] [target]; 42 | } 43 | 44 | cascade filer/main.text = filer/globals.text; 45 | -------------------------------------------------------------------------------- /host/00readme.txt: -------------------------------------------------------------------------------- 1 | # 2 | # UCSD p-System Operating System 3 | # Copyright (C) 2010 Peter Miller 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright 11 | # notice, this list of conditions and the following disclaimer in the 12 | # documentation and/or other materials provided with the distribution. 13 | # * Neither the name of the ucsd-psystem-os project nor the names of its 14 | # contributors may be used to endorse or promote products derived from 15 | # this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | # POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | 30 | .include ../arch/00readme.txt 31 | -------------------------------------------------------------------------------- /host/klebsch/long_integer/main.asm.text: -------------------------------------------------------------------------------- 1 | ; 2 | ; UCSD p-System Operating System 3 | ; Copyright (C) 2010 Peter Miller 4 | ; 5 | ; Redistribution and use in source and binary forms, with or without 6 | ; modification, are permitted provided that the following conditions are met: 7 | ; 8 | ; * Redistributions of source code must retain the above copyright notice, 9 | ; this list of conditions and the following disclaimer. 10 | ; * Redistributions in binary form must reproduce the above copyright 11 | ; notice, this list of conditions and the following disclaimer in the 12 | ; documentation and/or other materials provided with the distribution. 13 | ; * Neither the name of the ucsd-psystem-os project nor the names of its 14 | ; contributors may be used to endorse or promote products derived from 15 | ; this software without specific prior written permission. 16 | ; 17 | ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | ; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | ; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | ; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | ; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | ; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | ; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | ; POSSIBILITY OF SUCH DAMAGE. 28 | ; 29 | .proc decops 30 | .ascii 'decops:' 31 | .byte 0 32 | .end 33 | -------------------------------------------------------------------------------- /host/klebsch/long_integer/meson.build: -------------------------------------------------------------------------------- 1 | long_integer_main_asm_code = custom_target( 2 | 'host_long_integer_main_asm_code', 3 | output : 'main.asm.code', 4 | input : 'main.asm.text', 5 | command : as_command, 6 | ) 7 | -------------------------------------------------------------------------------- /host/klebsch/meson.build: -------------------------------------------------------------------------------- 1 | system_miscinfo = custom_target( 2 | 'system_miscinfo', 3 | output : 'system.miscinfo', 4 | input : 'miscinfo.text', 5 | command : [setup, arch_flag, '--encode', '@INPUT@', '@OUTPUT@'], 6 | env : mkfsdisk_env, 7 | build_by_default : true, 8 | ) 9 | 10 | subdir('long_integer') 11 | subdir('transcendental') 12 | subdir('turtle_graphics') 13 | -------------------------------------------------------------------------------- /host/klebsch/miscinfo.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | *) 29 | Has clock := true 30 | Has 8510a := false 31 | Has lower case := true 32 | Has random cursor addressing := true 33 | Has slow terminal := false 34 | Student := false 35 | Has byte flipped machine := false 36 | Has word oriented machine := false 37 | Lead in to screen := NUL 38 | Move cursor home := EM 39 | Prefixed[Move cursor home] := false 40 | Erase to end of screen := VT 41 | Prefixed[Erase to end of screen] := false 42 | Erase to end of line := GS 43 | Prefixed[Erase to end of line] := false 44 | Move cursor right := FS 45 | Prefixed[Move cursor right] := false 46 | Move cursor up := US 47 | Prefixed[Move cursor up] := false 48 | Vertical move delay := 0 49 | Backspace := BS 50 | Prefixed[Delete character] := false 51 | Erase line := NUL 52 | Prefixed[Erase line] := false 53 | Erase screen := FF 54 | Prefixed[Erase screen] := false 55 | Screen height := 24 56 | Screen width := 80 57 | Key to move cursor up := SI 58 | Prefixed[Key to move cursor up] := false 59 | Key to move cursor down := FF 60 | Prefixed[Key to move cursor down] := false 61 | Key to move cursor left := BS 62 | Prefixed[Key to move cursor left] := false 63 | Key to move cursor right := NAK 64 | Prefixed[Key to move cursor right] := false 65 | Key to end file := ETX 66 | Prefixed[Key to end file] := false 67 | Key for flush := ACK 68 | Prefixed[Key for flush] := false 69 | Key for break := NUL 70 | Prefixed[Key for break] := false 71 | Key for stop := DC3 72 | Prefixed[Key for stop] := false 73 | Key to delete character := BS 74 | Prefixed[Key to delete character] := false 75 | Non-printing character := '?' 76 | Prefixed[Non-printing character] := false 77 | Key to delete line := CAN 78 | Prefixed[Key to delete line] := false 79 | Editor escape key := ESC 80 | Prefixed[Editor escape key] := false 81 | Lead in from keyboard := NUL 82 | Editor accept key := ETX 83 | Prefixed[Editor accept key] := false 84 | -------------------------------------------------------------------------------- /host/klebsch/transcendental/main.asm.text: -------------------------------------------------------------------------------- 1 | ; 2 | ; UCSD p-System Operating System 3 | ; Copyright (C) 2010 Peter Miller 4 | ; 5 | ; Redistribution and use in source and binary forms, with or without 6 | ; modification, are permitted provided that the following conditions are met: 7 | ; 8 | ; * Redistributions of source code must retain the above copyright notice, 9 | ; this list of conditions and the following disclaimer. 10 | ; * Redistributions in binary form must reproduce the above copyright 11 | ; notice, this list of conditions and the following disclaimer in the 12 | ; documentation and/or other materials provided with the distribution. 13 | ; * Neither the name of the ucsd-psystem-os project nor the names of its 14 | ; contributors may be used to endorse or promote products derived from 15 | ; this software without specific prior written permission. 16 | ; 17 | ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | ; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | ; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | ; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | ; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | ; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | ; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | ; POSSIBILITY OF SUCH DAMAGE. 28 | ; 29 | .func sin, 2 30 | .ascii 'transcen:sin' 31 | .byte 0 32 | 33 | .func cos, 2 34 | .ascii 'transcen:cos' 35 | .byte 0 36 | 37 | .func exp, 2 38 | .ascii 'transcen:exp' 39 | .byte 0 40 | 41 | .func atan, 2 42 | .ascii 'transcen:atan' 43 | .byte 0 44 | 45 | .func ln, 2 46 | .ascii 'transcen:ln' 47 | .byte 0 48 | 49 | .func log, 2 50 | .ascii 'transcen:log' 51 | .byte 0 52 | 53 | .func sqrt, 2 54 | .ascii 'transcen:sqrt' 55 | .byte 0 56 | 57 | .end 58 | -------------------------------------------------------------------------------- /host/klebsch/transcendental/meson.build: -------------------------------------------------------------------------------- 1 | transcendental_main_asm_code = custom_target( 2 | 'host_transcendental_main_asm_code', 3 | output : 'main.asm.code', 4 | input : 'main.asm.text', 5 | command : as_command, 6 | ) 7 | -------------------------------------------------------------------------------- /host/klebsch/turtle_graphics/main.asm.text: -------------------------------------------------------------------------------- 1 | ; 2 | ; UCSD p-System Operating System 3 | ; Copyright (C) 2000 Mario Klebsch 4 | ; Copyright (C) 2010 Peter Miller 5 | ; 6 | ; This program is free software; you can redistribute it and/or modify 7 | ; it under the terms of the GNU General Public License as published by 8 | ; the Free Software Foundation; either version 2 of the License, or 9 | ; (at your option) any later version. 10 | ; 11 | ; This program is distributed in the hope that it will be useful, 12 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | ; GNU General Public License for more details. 15 | ; 16 | ; You should have received a copy of the GNU General Public License along 17 | ; with this program. If not, see 18 | 19 | ;procedure initturtle; 20 | .proc initturtle, 0 21 | .ascii "TURTLEGRAPHICS::INITTURTLE" 22 | .byte 0 23 | 24 | ;procedure turn(angle: integer); 25 | .proc turn, 1 26 | .ascii "TURTLEGRAPHICS::TURN" 27 | .byte 0 28 | 29 | ;procedure turnto(angle: integer); 30 | .proc turnto, 1 31 | .ascii "TURTLEGRAPHICS::TURNTO" 32 | .byte 0 33 | 34 | ;procedure move(dist: integer); 35 | .proc move, 1 36 | .ascii "TURTLEGRAPHICS::MOVE" 37 | .byte 0 38 | 39 | ;procedure moveto(x, y: integer); 40 | .proc moveto, 2 41 | .ascii "TURTLEGRAPHICS::MOVETO" 42 | .byte 0 43 | 44 | ;procedure pencolor(penmode: screencolor); 45 | .proc pencolor, 1 46 | .ascii "TURTLEGRAPHICS::PENCOLOR" 47 | .byte 0 48 | 49 | ;procedure textmode; 50 | .proc textmode 51 | .ascii "TURTLEGRAPHICS::TEXTMODE" 52 | .byte 0 53 | 54 | ;procedure grafmode; 55 | .proc grafmode 56 | .ascii "TURTLEGRAPHICS::GRAFMODE" 57 | .byte 0 58 | 59 | ;procedure fillscreen(fillcolor: screencolor); 60 | .proc fillscreen, 1 61 | .ascii "TURTLEGRAPHICS::FILLSCREEN" 62 | .byte 0 63 | 64 | ;procedure viewport(left, right, bottom, top: integer); 65 | .proc viewport, 4 66 | .ascii "TURTLEGRAPHICS::VIEWPORT" 67 | .byte 0 68 | 69 | ;function turtlex: integer; 70 | .func turtlex 71 | .ascii "TURTLEGRAPHICS::TURTLEX" 72 | .byte 0 73 | 74 | ;function turtley: integer; 75 | .func turtley 76 | .ascii "TURTLEGRAPHICS::TURTLEY" 77 | .byte 0 78 | 79 | ;function turtleang: integer; 80 | .func turtleang 81 | .ascii "TURTLEGRAPHICS::TURTLEANG" 82 | .byte 0 83 | 84 | ;function screenbit(x, y: integer): boolean; 85 | .func screenbit, 2 86 | .ascii "TURTLEGRAPHICS::SCREENBIT" 87 | .byte 0 88 | 89 | ;procedure drawblock(var source; rowsize, xskip, yskip, width, height, 90 | ; xscreen, yscreen, mode: integer); 91 | .proc drawblock, 9 92 | .ascii "TURTLEGRAPHICS::DRAWBLOCK" 93 | .byte 0 94 | 95 | ;procedure wchar(ch: char); 96 | .proc wchar, 1 97 | .ascii "TURTLEGRAPHICS::WCHAR" 98 | .byte 0 99 | 100 | ;procedure wstring(s: string); 101 | .proc wstring, 1 102 | .ascii "TURTLEGRAPHICS::WSTRING" 103 | .byte 0 104 | 105 | ;procedure chartype(mode: integer); 106 | .proc chartype, 1 107 | .ascii "TURTLEGRAPHICS::CHARTYPE" 108 | .byte 0 109 | 110 | .end 111 | -------------------------------------------------------------------------------- /host/klebsch/turtle_graphics/meson.build: -------------------------------------------------------------------------------- 1 | turtle_graphics_main_asm_code = custom_target( 2 | 'host_turtle_graphics_main_asm_code', 3 | output : 'main.asm.code', 4 | input : 'main.asm.text', 5 | command : as_command, 6 | ) 7 | -------------------------------------------------------------------------------- /libmap/meson.build: -------------------------------------------------------------------------------- 1 | libmap_code = custom_target( 2 | 'libmap_code', 3 | output : 'libmap.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /librarian/meson.build: -------------------------------------------------------------------------------- 1 | librarian_main_pas_code = custom_target( 2 | 'librarian_main_pas_code', 3 | output : 'main.code', 4 | input : 'main.text', 5 | command : pc_system_command, 6 | ) 7 | 8 | librarian_code = custom_target( 9 | 'librarian_code', 10 | output : 'librarian.code', 11 | input : librarian_main_pas_code, 12 | command : ar_system_command, 13 | build_by_default : true, 14 | ) 15 | -------------------------------------------------------------------------------- /librarian/module.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | all += datadir/system.library; 31 | 32 | datadir/system.library: librarian/main.code 33 | set shallow 34 | { 35 | cp [resolve [need]] [target]; 36 | } 37 | -------------------------------------------------------------------------------- /linker/main.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD PASCAL - Version I.5 3 | * Copyright (C) 1978, 1979 Regents of the University of California 4 | * All Rights Reserved 5 | * 6 | * Permission to use, copy, modify and distribute any part of UCSD 7 | * PASCAL solely authored by UC authors before June 1, 1979 for 8 | * educational, research and non-profit purposes, without fee, and 9 | * without a written agreement is hereby granted, provided that the 10 | * above copyright notice, this paragraph and the following three 11 | * paragraphs appear in all copies. 12 | * 13 | * Those desiring to incorporate UCSD PASCAL into commercial products or 14 | * use for commercial purposes should contact the Technology Transfer & 15 | * Intellectual Property Services, University of California, San Diego, 16 | * 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | * Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | * 19 | * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | * DAMAGE. 24 | * 25 | * THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | * OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | * MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | * EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | * THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | * OTHER RIGHTS. 33 | * 34 | * Case Number: SD1991-807 (2006) 35 | * http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | *) 37 | 38 | {$I link0.text } 39 | {$I link1.text } 40 | {$I link2.text } 41 | {$I link3a.text } 42 | {$I link3b.text } 43 | 44 | begin { linker } 45 | phase1; 46 | phase2; 47 | phase3; 48 | unitclear(3) 49 | end { linker } ; 50 | 51 | begin end. 52 | -------------------------------------------------------------------------------- /linker/meson.build: -------------------------------------------------------------------------------- 1 | linker_globals_text = fs.copyfile(globals_text) 2 | linker_vstamp_inc_text = fs.copyfile(vstamp_inc_text) 3 | 4 | linker_main_pas_code = custom_target( 5 | 'linker_main_pas_code', 6 | output : 'main.code', 7 | input : 'main.text', 8 | depends : [linker_globals_text, linker_vstamp_inc_text], 9 | command : pc_system_command, 10 | ) 11 | 12 | system_linker = custom_target( 13 | 'system_linker', 14 | output : 'system.linker', 15 | input : linker_main_pas_code, 16 | command : ar_system_command, 17 | build_by_default : true, 18 | ) 19 | -------------------------------------------------------------------------------- /linker/module.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | all += datadir/system.linker; 31 | 32 | datadir/system.linker: linker/main.code 33 | set shallow 34 | { 35 | cp [resolve [need]] [target]; 36 | } 37 | -------------------------------------------------------------------------------- /long_integer/meson.build: -------------------------------------------------------------------------------- 1 | long_integer_globals_text = fs.copyfile(globals_text) 2 | long_integer_vstamp_inc_text = fs.copyfile(vstamp_inc_text) 3 | 4 | long_integer_main_pas_code = custom_target( 5 | 'long_integer_main_pas_code', 6 | output : 'main.pas.code', 7 | input : 'main.text', 8 | depends : [long_integer_globals_text, long_integer_vstamp_inc_text], 9 | command : pc_system_command, 10 | ) 11 | 12 | long_integer_main_lib_code = custom_target( 13 | 'long_integer_main_lib_code', 14 | output : 'main.lib.code', 15 | input : long_integer_main_pas_code, 16 | command : ar_system_command, 17 | ) 18 | 19 | long_integer_main_code = custom_target( 20 | 'long_integer_main_code', 21 | output : 'main.code', 22 | input : [long_integer_main_pas_code, long_integer_main_asm_code], 23 | command : ld_command, 24 | build_by_default : true, 25 | ) 26 | -------------------------------------------------------------------------------- /man/man1/ucsdpsys_os_license_bsd.1: -------------------------------------------------------------------------------- 1 | .TH "License" 2 | .SH "LICENSE" 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | .TP 2m 6 | \[bu] 7 | Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | .TP 2m 10 | \[bu] 11 | Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | .TP 2m 15 | \[bu] 16 | Neither the name of the ucsd-psystem-os project nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | .PP 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 24 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /man/man1/ucsdpsys_os_license_ucsd.1: -------------------------------------------------------------------------------- 1 | .TH "UCSD License" "2.0" "" "" "Regents of the University of California" 2 | .SH "UCSD LICENSE" 3 | UCSD PASCAL - Version II.0 4 | .br 5 | Copyright 6 | .if n (C) 7 | .if t \(co 8 | 1979 Regents of the University of California 9 | .br 10 | All Rights Reserved 11 | .XX "ucsdpsys_os_license_ucsd(2.0)" "II.0 UCSD License 2006" 12 | .PP 13 | Permission to use, copy, modify and distribute any part of this UCSD 14 | PASCAL for educational, research and non-profit purposes, without 15 | fee, and without a written agreement is hereby granted, provided that 16 | the above copyright notice, this paragraph and the following three 17 | paragraphs appear in all copies. 18 | .PP 19 | Those desiring to incorporate UCSD PASCAL into commercial products or 20 | use for commercial purposes should contact the Technology Transfer & 21 | Intellectual Property Services, University of California, San Diego, 22 | 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 23 | .br 24 | Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 25 | .PP 26 | IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 27 | FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 28 | INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 29 | THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 30 | DAMAGE. 31 | .PP 32 | THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 33 | OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 34 | UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 35 | MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 36 | EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 37 | WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 38 | THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 39 | OTHER RIGHTS. 40 | .SH REFERENCE 41 | Case Number: SD1991-807 (2006) 42 | .br 43 | http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 44 | .\" 45 | .\" ------------------------------------------------------------------------ 46 | .\" 47 | .TH "UCSD License" "1.5" "" "" "Regents of the University of California" 48 | .SH "UCSD LICENSE" 49 | UCSD PASCAL - Version I.5 50 | .br 51 | Copyright 52 | .if n (C) 53 | .if t \(co 54 | 1978 Regents of the University of California 55 | .br 56 | All Rights Reserved 57 | .XX "ucsdpsys_os_license_ucsd(1.5)" "I.5 UCSD License 2006" 58 | .PP 59 | Permission to use, copy, modify and distribute any part of this UCSD 60 | PASCAL for educational, research and non-profit purposes, without 61 | fee, and without a written agreement is hereby granted, provided that 62 | the above copyright notice, this paragraph and the following three 63 | paragraphs appear in all copies. 64 | .PP 65 | Those desiring to incorporate UCSD PASCAL into commercial products or 66 | use for commercial purposes should contact the Technology Transfer & 67 | Intellectual Property Services, University of California, San Diego, 68 | 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 69 | .br 70 | Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 71 | .PP 72 | IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 73 | FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 74 | INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 75 | THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 76 | DAMAGE. 77 | .PP 78 | THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 79 | OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 80 | UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 81 | MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 82 | EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 83 | WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 84 | THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 85 | OTHER RIGHTS. 86 | .SH REFERENCE 87 | Case Number: SD1991-807 (2006) 88 | .br 89 | http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.htm 90 | -------------------------------------------------------------------------------- /man/meson.build: -------------------------------------------------------------------------------- 1 | install_man( 2 | 'man1/ucsdpsys_os_license_bsd.1', 3 | 'man1/ucsdpsys_os_license_ucsd.1', 4 | ) 5 | -------------------------------------------------------------------------------- /markdupdir/main.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD PASCAL - Version I.5 3 | * Copyright (C) 1978, 1979 Regents of the University of California 4 | * All Rights Reserved 5 | * 6 | * Permission to use, copy, modify and distribute any part of UCSD 7 | * PASCAL solely authored by UC authors before June 1, 1979 for 8 | * educational, research and non-profit purposes, without fee, and 9 | * without a written agreement is hereby granted, provided that the 10 | * above copyright notice, this paragraph and the following three 11 | * paragraphs appear in all copies. 12 | * 13 | * Those desiring to incorporate UCSD PASCAL into commercial products or 14 | * use for commercial purposes should contact the Technology Transfer & 15 | * Intellectual Property Services, University of California, San Diego, 16 | * 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | * Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | * 19 | * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | * DAMAGE. 24 | * 25 | * THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | * OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | * MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | * EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | * THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | * OTHER RIGHTS. 33 | * 34 | * Case Number: SD1991-807 (2006) 35 | * http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | *) 37 | 38 | PROGRAM DUPLICATEDIRECTORYMARKER; 39 | 40 | (*) This utility marks DLASTBLK as 10 so that a duplicate (*) 41 | (*) directory will be maintained by the operating system. (*) 42 | 43 | CONST 44 | DIRBLOX = 4; {size of a directory in blocks} 45 | BLOCKBYTES = 511; {size of a block in bytes minus 1} 46 | 47 | FIRSTIDCHAR = 7; {location of first character in volume id} 48 | MAXIDLENGTH = 7; 49 | 50 | DUPDIRLASTBLK = 10; 51 | 52 | VAR 53 | UNITID : STRING[1]; 54 | DRIVENUM : INTEGER; 55 | BUFFER : PACKED ARRAY [ 1 .. DIRBLOX, 0 .. BLOCKBYTES ] OF CHAR; 56 | IDLENGTH, N : INTEGER; 57 | 58 | FUNCTION YES: BOOLEAN; 59 | VAR CH : CHAR; 60 | BEGIN 61 | UNITREAD( 1, CH, 1, 0, 0 ); 62 | WRITELN; 63 | YES := (CH = 'Y'); 64 | END; 65 | 66 | BEGIN { of Duplicate Directory Marker } 67 | 68 | PAGE(OUTPUT); 69 | WRITELN; 70 | WRITELN( 'Duplicate Directory Marker { July 13, 1978 } ' ); 71 | WRITELN; 72 | 73 | REPEAT 74 | WRITE( ' Enter drive # of user''s disk [4 or 5]: ' ); 75 | READLN( UNITID ); 76 | WRITELN; 77 | IF LENGTH( UNITID ) > 0 THEN 78 | DRIVENUM := ORD( UNITID[1] ) - ORD('0') 79 | ELSE 80 | EXIT( PROGRAM ); 81 | UNTIL DRIVENUM IN [4,5]; 82 | 83 | UNITREAD( DRIVENUM, BUFFER, SIZEOF(BUFFER), 2, 0 ); 84 | IDLENGTH := ORD( BUFFER[ 1, 6 ] ); 85 | 86 | IF (IDLENGTH > MAXIDLENGTH) OR (IDLENGTH <= 0) THEN 87 | BEGIN 88 | WRITE( 'Illegal volume name. Do you want to mark it anyway? ' ); 89 | IF NOT YES THEN 90 | EXIT( PROGRAM ); 91 | END; 92 | 93 | IF (ORD( BUFFER[ 1, 2 ] ) <> DUPDIRLASTBLK) 94 | OR (ORD( BUFFER[ 1, 3 ] ) <> 0 ) THEN 95 | BEGIN 96 | WRITE( 'A duplicate directory is not being maintained on ' ); 97 | FOR N := FIRSTIDCHAR TO (FIRSTIDCHAR - 1 + IDLENGTH) DO 98 | WRITE( BUFFER[ 1, N ] ); 99 | WRITELN( ': .'); 100 | IF ORD( BUFFER[ 1, 2 ] ) = 6 THEN 101 | BEGIN 102 | WRITELN('WARNING! It appears that blocks 6 - 9 are not free for use.' ); 103 | WRITE( ' Are you sure that they are free? ' ); 104 | END 105 | ELSE 106 | WRITE( ' Are you sure that blocks 6 - 9 are free for use? ' ); 107 | IF YES THEN 108 | BEGIN 109 | WRITE( ' Do you want the directories to be marked? ' ); 110 | IF YES THEN 111 | BEGIN 112 | BUFFER[ 1, 2 ] := CHR( DUPDIRLASTBLK ); 113 | BUFFER[ 1, 3 ] := CHR(0); 114 | UNITWRITE( DRIVENUM, BUFFER, SIZEOF(BUFFER), 6, 0 ); 115 | UNITWRITE( DRIVENUM, BUFFER, SIZEOF(BUFFER), 2, 0 ); 116 | WRITE( ' Directories are now marked as duplicate. ' ); 117 | END; 118 | END; 119 | END 120 | ELSE 121 | BEGIN 122 | WRITE( ' A duplicate directory is already being maintained on ' ); 123 | FOR N := FIRSTIDCHAR TO (FIRSTIDCHAR - 1 + IDLENGTH) DO 124 | WRITE( BUFFER[ 1, N ] ); 125 | WRITELN( ': .'); 126 | WRITE( ' Mark not done. ' ); 127 | END; 128 | 129 | WRITE( 'Type to exit. ' ); 130 | READLN; 131 | 132 | END. 133 | -------------------------------------------------------------------------------- /markdupdir/meson.build: -------------------------------------------------------------------------------- 1 | markdupdir_code = custom_target( 2 | 'markdupdir_code', 3 | output : 'markdupdir.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project('ucsd-psystem-os', meson_version: '>=0.64.0') 2 | 3 | fs = import('fs') 4 | 5 | # Core system tools. 6 | python = find_program('python3') 7 | 8 | # Vague equivalents of standard tools. 9 | pc = find_program('pc', 'ucsdpsys_compile') 10 | as = find_program('pc_as', 'ucsdpsys_assemble') 11 | ar = find_program('pc_ar', 'ucsdpsys_librarian') 12 | ld = find_program('pc_ld', 'ucsdpsys_link') 13 | 14 | # Host-agnostic ucsdpsys tools. 15 | disk = find_program('ucsdpsys_disk') 16 | mkfs = find_program('ucsdpsys_mkfs') 17 | setup = find_program('ucsdpsys_setup') 18 | 19 | # Where in our installation prefix volumes get installed 20 | volume_install_dir = get_option('datadir') / 'ucsd-psystem-os' 21 | 22 | # Flag used by many ucsdpsys tools to determine endianess and address 23 | # orientation. 24 | arch_flag = '--arch=' + get_option('target_arch') 25 | 26 | # Arg subset used by many ucsdpsys tools to specify in/output files. 27 | inout_args = ['-o', '@OUTPUT@', '@INPUT@'] 28 | 29 | # Generators don't support adding extra dependencies per invocation so we 30 | # unfortunately need to custom-craft custom targets for everything. 31 | pc_args = [arch_flag, '-Wno-shadow', '-I@OUTDIR@', '-I@CURRENT_SOURCE_DIR@'] 32 | pc_command = [pc, pc_args, inout_args] 33 | pc_system_command = [pc, pc_args, '-fignore-undefined-segment-zero', inout_args] 34 | 35 | # All "assembly" files in this project contain only constant data, so theoreticaly 36 | # they could be built either as p-code or machine instructions. However, 37 | # the linker expects a segment kind of SEPRTSEG, which only comes from a 38 | # machine language assembly. 39 | as_args = ['--arch=6502', '-I.', '-I@CURRENT_SOURCE_DIR@'] 40 | as_command = [as, as_args, inout_args] 41 | 42 | ar_system_command = [ar, '-o', '@OUTPUT@', '--file=@INPUT@', '--remove-system-segments'] 43 | 44 | ld_command = [ld, inout_args] 45 | 46 | mkfsdisk_env = environment({ 47 | 'MKFS': mkfs.full_path(), 48 | 'DISK': disk.full_path(), 49 | 'MKFS_ARCH': get_option('target_arch'), 50 | 'MKFS_SIZE': get_option('disk_kb').to_string(), 51 | }) 52 | mkfsdisk_command = [python, files('etc/mkfsdisk.py'), '@OUTPUT@', '@INPUT@'] 53 | 54 | vstamp_inc_text = files('etc/vstamp.inc.text') 55 | globals_text = files('system/globals.text') 56 | 57 | subdir('diagnostic') 58 | 59 | subdir('editor') 60 | subdir('filer') 61 | subdir('compiler') 62 | subdir('linker') 63 | subdir('host' / 'klebsch') 64 | subdir('long_integer') 65 | subdir('transcendental') 66 | subdir('turtle_graphics') 67 | subdir('pascalio') 68 | subdir('system') 69 | 70 | subdir('basic') 71 | subdir('binder') 72 | subdir('bios.diag') 73 | subdir('calc') 74 | subdir('copydupdir') 75 | subdir('disassembler') 76 | subdir('edittort11') 77 | subdir('execerr') 78 | subdir('libmap') 79 | subdir('librarian') 80 | subdir('markdupdir') 81 | subdir('radix') 82 | subdir('rt11toedit') 83 | subdir('setup') 84 | subdir('xref') 85 | subdir('yaloe') 86 | 87 | subdir('man') 88 | 89 | diagnostic_vol = custom_target( 90 | 'diagnostic_vol', 91 | output : 'diagnostic.vol', 92 | input : diagnostic_system_pascal, 93 | command : mkfsdisk_command, 94 | env : mkfsdisk_env, 95 | build_by_default : true, 96 | install : true, 97 | install_dir : volume_install_dir, 98 | ) 99 | 100 | system_vol = custom_target( 101 | 'system_vol', 102 | output : 'system.vol', 103 | input : [ 104 | system_system_pascal, 105 | system_miscinfo, 106 | system_compiler, 107 | system_editor, 108 | system_filer, 109 | system_library, 110 | system_linker, 111 | system_syntax, 112 | ], 113 | command : mkfsdisk_command, 114 | env : mkfsdisk_env, 115 | build_by_default : true, 116 | install : true, 117 | install_dir : volume_install_dir, 118 | ) 119 | 120 | utility_vol = custom_target( 121 | 'utility_vol', 122 | output : 'utility.vol', 123 | input : [ 124 | basic_code, 125 | binder_code, 126 | bios_diag_code, 127 | calc_code, 128 | copydupdir_code, 129 | disassembl_code, 130 | edittort11_code, 131 | execerr_code, 132 | libmap_code, 133 | librarian_code, 134 | markdupdir_code, 135 | radix_code, 136 | rt11toedit_code, 137 | setup_code, 138 | xref_code, 139 | yaloe_code, 140 | ], 141 | command : mkfsdisk_command, 142 | env : mkfsdisk_env, 143 | build_by_default : true, 144 | install : true, 145 | install_dir : volume_install_dir, 146 | ) 147 | -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | option('target_arch', 2 | type : 'combo', 3 | choices : ['p-code-le', 'p-code-be'], 4 | description : 'Byte sex of target machine: little-ended or big-ended`', 5 | value : 'p-code-le') 6 | 7 | option('disk_kb', 8 | type : 'integer', 9 | min : 4, 10 | max : 16384, 11 | description : 'Size of generated disk images in kB', 12 | value : 140) 13 | -------------------------------------------------------------------------------- /pascalio/main.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD PASCAL - Version I.5 3 | * Copyright (C) 1978, 1979 Regents of the University of California 4 | * All Rights Reserved 5 | * 6 | * Permission to use, copy, modify and distribute any part of UCSD 7 | * PASCAL solely authored by UC authors before June 1, 1979 for 8 | * educational, research and non-profit purposes, without fee, and 9 | * without a written agreement is hereby granted, provided that the 10 | * above copyright notice, this paragraph and the following three 11 | * paragraphs appear in all copies. 12 | * 13 | * Those desiring to incorporate UCSD PASCAL into commercial products or 14 | * use for commercial purposes should contact the Technology Transfer & 15 | * Intellectual Property Services, University of California, San Diego, 16 | * 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | * Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | * 19 | * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | * DAMAGE. 24 | * 25 | * THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | * OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | * MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | * EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | * THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | * OTHER RIGHTS. 33 | * 34 | * Case Number: SD1991-807 (2006) 35 | * http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | *) 37 | 38 | (*$U-*) 39 | (*$S+*) 40 | 41 | (*$I globals.text*) 42 | (*$I unit.text*) 43 | 44 | (* dummy outer block *) 45 | begin 46 | end. 47 | -------------------------------------------------------------------------------- /pascalio/meson.build: -------------------------------------------------------------------------------- 1 | pascalio_globals_text = fs.copyfile(globals_text) 2 | 3 | pascalio_main_pas_code = custom_target( 4 | 'pascalio_main_pas_code', 5 | output : 'main.code', 6 | input : 'main.text', 7 | depends : pascalio_globals_text, 8 | command : pc_system_command, 9 | ) 10 | 11 | pascalio_main_code = custom_target( 12 | 'pascalio_main_code', 13 | output : 'system.pascalio', 14 | input : pascalio_main_pas_code, 15 | command : ar_system_command, 16 | build_by_default : true, 17 | ) 18 | -------------------------------------------------------------------------------- /pascalio/module.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | pascalio/globals.text: system/globals.text 31 | { 32 | cp [resolve [need]] [target]; 33 | } 34 | 35 | cascade pascalio/main.text = pascalio/globals.text; 36 | -------------------------------------------------------------------------------- /radix/meson.build: -------------------------------------------------------------------------------- 1 | radix_code = custom_target( 2 | 'radix_code', 3 | output : 'radix.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /rt11toedit/meson.build: -------------------------------------------------------------------------------- 1 | rt11toedit_code = custom_target( 2 | 'rt11toedit_code', 3 | output : 'rt11toedit.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /setup/meson.build: -------------------------------------------------------------------------------- 1 | setup_main_pas_code = custom_target( 2 | 'setup_main_pas_code', 3 | output : 'main.code', 4 | input : 'main.text', 5 | command : pc_system_command, 6 | ) 7 | 8 | setup_code = custom_target( 9 | 'setup_code', 10 | output : 'setup.code', 11 | input : setup_main_pas_code, 12 | command : ar_system_command, 13 | build_by_default : true, 14 | ) 15 | -------------------------------------------------------------------------------- /system/main.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD PASCAL - Version I.5 3 | * Copyright (C) 1978, 1979 Regents of the University of California 4 | * All Rights Reserved 5 | * 6 | * Permission to use, copy, modify and distribute any part of UCSD 7 | * PASCAL solely authored by UC authors before June 1, 1979 for 8 | * educational, research and non-profit purposes, without fee, and 9 | * without a written agreement is hereby granted, provided that the 10 | * above copyright notice, this paragraph and the following three 11 | * paragraphs appear in all copies. 12 | * 13 | * Those desiring to incorporate UCSD PASCAL into commercial products or 14 | * use for commercial purposes should contact the Technology Transfer & 15 | * Intellectual Property Services, University of California, San Diego, 16 | * 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910, 17 | * Ph: (858) 534-5815, Fax: (858) 534-7345, E-Mail: invent@ucsd.edu. 18 | * 19 | * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 20 | * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 21 | * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF UCSD PASCAL, EVEN IF 22 | * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 23 | * DAMAGE. 24 | * 25 | * THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND THE UNIVERSITY 26 | * OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 27 | * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. THE UNIVERSITY OF CALIFORNIA 28 | * MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES OF ANY KIND, 29 | * EITHER IMPLIED OR EXPRESS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR 31 | * THAT THE USE OF UCSD PASCAL WILL NOT INFRINGE ANY PATENT, TRADEMARK OR 32 | * OTHER RIGHTS. 33 | * 34 | * Case Number: SD1991-807 (2006) 35 | * http://invent.ucsd.edu/technology/cases/1995-prior/SD1991-807.shtml 36 | *) 37 | 38 | (* 39 | * UCSD p-System Operating System 40 | * Copyright (C) 2010 Peter Miller 41 | * 42 | * Redistribution and use in source and binary forms, with or without 43 | * modification, are permitted provided that the following conditions are met: 44 | * 45 | * * Redistributions of source code must retain the above copyright notice, 46 | * this list of conditions and the following disclaimer. 47 | * * Redistributions in binary form must reproduce the above copyright 48 | * notice, this list of conditions and the following disclaimer in the 49 | * documentation and/or other materials provided with the distribution. 50 | * * Neither the name of the ucsd-psystem-os project nor the names of its 51 | * contributors may be used to endorse or promote products derived from 52 | * this software without specific prior written permission. 53 | * 54 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 55 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 56 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 57 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 58 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 59 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 60 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 61 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 62 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 63 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 64 | * POSSIBILITY OF SUCH DAMAGE. 65 | *) 66 | 67 | (*$I globals.text *) 68 | (*$I vstamp.inc.text *) 69 | (*$I syssegs.a.text *) 70 | (*$I syssegs.b.text *) 71 | (*$I system.a.text *) 72 | (*$I system.b.text *) 73 | (*$I system.c.text *) 74 | 75 | BEGIN (*UCSD PASCAL SYSTEM*) 76 | EMPTYHEAP := NIL; 77 | INITIALIZE; 78 | REPEAT 79 | COMMAND; 80 | IF EMPTYHEAP <> NIL THEN 81 | INITIALIZE 82 | UNTIL EMPTYHEAP = NIL 83 | END (*PASCALSYSTEM*) . 84 | -------------------------------------------------------------------------------- /system/meson.build: -------------------------------------------------------------------------------- 1 | system_globals_text = fs.copyfile(globals_text) 2 | system_vstamp_inc_text = fs.copyfile(vstamp_inc_text) 3 | 4 | system_system_pascal = custom_target( 5 | 'system_system_pascal', 6 | output : 'system.pascal', 7 | input : 'main.text', 8 | depends : [system_globals_text, system_vstamp_inc_text], 9 | command : pc_command, 10 | ) 11 | 12 | system_library = custom_target( 13 | 'system_library', 14 | output : 'system.library', 15 | input : [ 16 | long_integer_main_code, 17 | pascalio_main_code, 18 | transcendental_main_code, 19 | turtle_graphics_main_code, 20 | ], 21 | command : [ 22 | ar, '--create', '@OUTPUT@', 23 | '--copy', '@INPUT0@', '--segment', 'longinte=30', 24 | '--copy', '@INPUT1@', '--segment', 'pascalio=31', 25 | '--copy', '@INPUT2@', '--segment', 'transcen=29', 26 | '--copy', '@INPUT3@', '--segment', 'turtlegr=20', 27 | ] 28 | ) 29 | -------------------------------------------------------------------------------- /system/module.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | all += 31 | datadir/system.pascal 32 | ; 33 | 34 | datadir/system.pascal: system/main.code 35 | set shallow 36 | { 37 | cp [resolve [need]] [target]; 38 | } 39 | 40 | datadir/system.miscinfo: system/miscinfo.text 41 | { 42 | ucsdpsys_setup -e [resolve system/miscinfo.text] [target]; 43 | } 44 | -------------------------------------------------------------------------------- /transcendental/main.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | *) 29 | 30 | (*$S+*) 31 | (*$U+*) 32 | unit transcendental; 33 | intrinsic code 29; 34 | 35 | interface 36 | 37 | function sin(x: real): real; 38 | function cos(x: real): real; 39 | function exp(x: real): real; 40 | function atan(x: real): real; 41 | function ln(x: real): real; 42 | function log(x: real): real; 43 | function sqrt(x: real): real; 44 | 45 | implementation 46 | 47 | function sin; external; 48 | function cos; external; 49 | function exp; external; 50 | function atan; external; 51 | function ln; external; 52 | function log; external; 53 | function sqrt; external; 54 | 55 | begin 56 | end. 57 | -------------------------------------------------------------------------------- /transcendental/meson.build: -------------------------------------------------------------------------------- 1 | transcendental_globals_text = fs.copyfile(globals_text) 2 | transcendental_vstamp_inc_text = fs.copyfile(vstamp_inc_text) 3 | 4 | transcendental_main_pas_code = custom_target( 5 | 'transcendental_main_pas_code', 6 | output : 'main.pas.code', 7 | input : 'main.text', 8 | depends : [transcendental_globals_text, transcendental_vstamp_inc_text], 9 | command : pc_system_command, 10 | ) 11 | 12 | transcendental_main_lib_code = custom_target( 13 | 'transcendental_main_lib_code', 14 | output : 'main.lib.code', 15 | input : transcendental_main_pas_code, 16 | command : ar_system_command, 17 | ) 18 | 19 | transcendental_main_code = custom_target( 20 | 'transcendental_main_code', 21 | output : 'main.code', 22 | input : [transcendental_main_pas_code, transcendental_main_asm_code], 23 | command : ld_command, 24 | build_by_default : true, 25 | ) 26 | -------------------------------------------------------------------------------- /turtle_graphics/main.text: -------------------------------------------------------------------------------- 1 | (* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2000 Mario Klebsch 4 | * Copyright (C) 2010 Peter Miller 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program. If not, see 18 | *) 19 | 20 | (*$S+*) 21 | unit turtlegr; 22 | intrinsic code 20 (* data 21 *); 23 | (* The ucsd-psystem-xc project cannot yet link DATASEG segments. *) 24 | 25 | interface 26 | 27 | type 28 | screencolor = (none, white, black, reverse, radar, black1, green, 29 | violet, white1, black2, orange, blue, white2); 30 | 31 | procedure initturtle; 32 | procedure turn(angle: integer); 33 | procedure turnto(angle: integer); 34 | procedure move(dist: integer); 35 | procedure moveto(x, y: integer); 36 | procedure pencolor(penmode: screencolor); 37 | procedure textmode; 38 | procedure grafmode; 39 | procedure fillscreen(fillcolor: screencolor); 40 | procedure viewport(left, right, bottom, top: integer); 41 | function turtlex: integer; 42 | function turtley: integer; 43 | function turtleang: integer; 44 | function screenbit(x, y: integer): boolean; 45 | procedure drawblock(var source; rowsize, xskip, yskip, width, height, 46 | xscreen, yscreen, mode: integer); 47 | procedure wchar(ch: char); 48 | procedure wstring(s: string); 49 | procedure chartype(mode: integer); 50 | 51 | implementation 52 | 53 | (* var dummy: array[1..193] of integer; *) 54 | (* The ucsd-psystem-xc project cannot yet link DATASEG segments. *) 55 | 56 | procedure initturtle; external; 57 | procedure turn; external; 58 | procedure turnto; external; 59 | procedure move; external; 60 | procedure moveto; external; 61 | procedure pencolor; external; 62 | procedure textmode; external; 63 | procedure grafmode; external; 64 | procedure fillscreen; external; 65 | procedure viewport; external; 66 | function turtlex; external; 67 | function turtley; external; 68 | function turtleang; external; 69 | function screenbit; external; 70 | procedure drawblock; external; 71 | procedure wchar; external; 72 | procedure wstring; external; 73 | procedure chartype; external; 74 | 75 | begin 76 | end. 77 | -------------------------------------------------------------------------------- /turtle_graphics/meson.build: -------------------------------------------------------------------------------- 1 | turtle_graphics_globals_text = fs.copyfile(globals_text) 2 | turtle_graphics_vstamp_inc_text = fs.copyfile(vstamp_inc_text) 3 | 4 | turtle_graphics_main_pas_code = custom_target( 5 | 'turtle_graphics_main_pas_code', 6 | output : 'main.pas.code', 7 | input : 'main.text', 8 | depends : [turtle_graphics_globals_text, turtle_graphics_vstamp_inc_text], 9 | command : pc_system_command, 10 | ) 11 | 12 | turtle_graphics_main_lib_code = custom_target( 13 | 'turtle_graphics_main_lib_code', 14 | output : 'main.lib.code', 15 | input : turtle_graphics_main_pas_code, 16 | command : ar_system_command, 17 | ) 18 | 19 | turtle_graphics_main_code = custom_target( 20 | 'turtle_graphics_main_code', 21 | output : 'main.code', 22 | input : [turtle_graphics_main_pas_code, turtle_graphics_main_asm_code], 23 | command : ld_command, 24 | build_by_default : true, 25 | ) 26 | -------------------------------------------------------------------------------- /ucsdpsys_os_license_bsd.1: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" UCSD p-System Operating System 3 | .\" Copyright (C) 2010 Peter Miller 4 | .\" 5 | .\" Redistribution and use in source and binary forms, with or without 6 | .\" modification, are permitted provided that the following conditions are met: 7 | .\" 8 | .\" * Redistributions of source code must retain the above copyright notice, 9 | .\" this list of conditions and the following disclaimer. 10 | .\" * Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" * Neither the name of the ucsd-psystem-os project nor the names of its 14 | .\" contributors may be used to endorse or promote products derived from 15 | .\" this software without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | .\" POSSIBILITY OF SUCH DAMAGE. 28 | .\" 29 | .ds n) ucsdpsys_os_license_bsd 30 | .TH \*(n) 1 ucsd-psystem-os "Reference Manual" 31 | .SH NAME 32 | ucsdpsys_os_license_bsd \- UCSD p-System thingummy 33 | .XX "ucsdpsys_os_license_bsd(1)" "UCSD p-System thingummy" 34 | .SH SYNOPSIS 35 | \fB\*(n)\fP [ \fIoption\fP... ] \fIfilename\P... 36 | .br 37 | \fB\*(n) \-V\fP 38 | .SH DESCRIPTION 39 | The \fI\*(n)\fP program is used to 40 | .br 41 | .ne 1i 42 | .SH OPTIONS 43 | The following options are understood: 44 | .TP 8n 45 | \fB\-V\fP 46 | .br 47 | Print the version of the \fI\*(n)\fP program being executed. 48 | .PP 49 | All other options will produce a diagnostic error. 50 | .so z_exit.so 51 | .so z_copyright.so 52 | -------------------------------------------------------------------------------- /web/howto.html: -------------------------------------------------------------------------------- 1 | .\" 2 | .\" UCSD p-System Operating System 3 | .\" Copyright (C) 2011 Peter Miller 4 | .\" 5 | .\" Redistribution and use in source and binary forms, with or without 6 | .\" modification, are permitted provided that the following conditions are met: 7 | .\" 8 | .\" * Redistributions of source code must retain the above copyright notice, 9 | .\" this list of conditions and the following disclaimer. 10 | .\" * Redistributions in binary form must reproduce the above copyright 11 | .\" notice, this list of conditions and the following disclaimer in the 12 | .\" documentation and/or other materials provided with the distribution. 13 | .\" * Neither the name of the ucsd-psystem-os project nor the names of its 14 | .\" contributors may be used to endorse or promote products derived from 15 | .\" this software without specific prior written permission. 16 | .\" 17 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | .\" POSSIBILITY OF SUCH DAMAGE. 28 | .\" 29 | .ad l 30 | .hy 0 31 | .so version.so 32 | .nf 33 | 34 | 35 | 36 | ucsd-psystem-os \*(v) Howto 37 |

38 | 39 | 40 | ucsd-psystem-os \*(v)
41 | How To Use It

42 | This page explains how to get your shiny new UCSD Pascal system working. 43 | 44 |

Software

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

56 | Alternatively, if you are using Ubuntu Linux, you can get pre-built 57 | packages from LaunchPad, 58 | using a PPA: 59 |

60 |
 61 | sudo add-apt-repository ppa:pmiller-opensource/ppa
 62 | sudo apt-get update
 63 | 
64 |
65 | and then you simply install them as usual: 66 |
67 |
 68 | sudo apt-get install ucsd-psystem-xc ucsd-psystem-fs ucsd-psystem-vm
 69 | 
70 |
71 |

Build the UCSD Pascal operating System

72 | See the building web page. 73 |

74 | Alternatively, 75 | you can download pre-built disk images from this web site: 76 |

    77 |
  • system.vol 78 | The cross compiled system disk image. 79 |
  • utility.vol 80 | The cross compiled utilities disk image. 81 |
82 | using these commands: 83 |
84 |
 85 | wget http://miller.emu.id.au/pmiller/ucsd-psystem-os/disk-image/system.vol
 86 | wget http://miller.emu.id.au/pmiller/ucsd-psystem-os/disk-image/utility.vol
 87 | 
88 |
89 | 90 |

Work Area

91 | We are going to use a simple work area for the rest of this demonstration. 92 | Change directory into your new work area. 93 |
94 |
 95 | mkdir work
 96 | cd work
 97 | 
98 |
99 | In this work area, create a file called “hello.text” 100 | (note the four-letter file extension) 101 | with the following contents: 102 |
103 |
104 | program hello;
105 | begin
106 |   writeln('Hellow, World!')
107 | end.
108 | 
109 |
110 | 111 |

Cross Compiler

112 | 113 | You can compile the program using the cross compiler: 114 |
115 |
116 | ucsdpsys_compile hello.text
117 | 
118 |
119 | To execute it, start the virtual machine, 120 | and automagically turn the current directory 121 | into a disk image: 122 |
123 |
124 | ucsdpsys -w . -f ../system.vol -N
125 | 
126 |
127 | You will now see the familiar UCSD Pascal prompt: 128 |
129 |
130 | Command: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem, D(ebug,? [II.0]
131 | 
132 | Welcome  SYSTEM,  to
133 | 
134 | U.C.S.D.  Pascal  System  II.0
135 | http://miller.emu.id.au/pmiller/ucsd-psystem-os/ version \*(V)
136 | 
137 | Current date is  26-Jan-11
138 | 
139 |
140 | we then have to change director into the WORK disk, because it 141 | has been build to contain the files in the current directory: 142 |
F P WORK: return Q
143 | Now you can run the cross compiled program like so: 144 |
X HELLO return
145 | And you will see the display: 146 |
147 |
148 | Command: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem, D(ebug,? [II.0]
149 | Hello, World!
150 | 
151 |
152 | 153 |

Native Compiler

154 | Alternatively, use the UCSD native compiler: 155 |
156 | C HELLO return
HELLO return 157 |
158 | and execute it the same way as you executed the cross compiled version. 159 | 160 |

Get Me Out Of Here

161 | To quit the system, use H for halt. 162 |

163 | You will notice that the current directory has been updated with the changes 164 | made to the WORK: volume while it was being used 165 | (that's what the “ucsdpsys \-w .” option was for). 166 | 167 | 168 | -------------------------------------------------------------------------------- /xref/meson.build: -------------------------------------------------------------------------------- 1 | xref_code = custom_target( 2 | 'xref_code', 3 | output : 'xref.code', 4 | input : 'main.text', 5 | command : pc_command, 6 | ) 7 | -------------------------------------------------------------------------------- /yaloe/meson.build: -------------------------------------------------------------------------------- 1 | yaloe_globals_text = fs.copyfile(globals_text) 2 | 3 | yaloe_main_pas_code = custom_target( 4 | 'yaloe_main_pas_code', 5 | output : 'main.code', 6 | input : 'main.text', 7 | depends : yaloe_globals_text, 8 | command : pc_system_command, 9 | ) 10 | 11 | yaloe_code = custom_target( 12 | 'yaloe_code', 13 | output : 'yaloe.code', 14 | input : yaloe_main_pas_code, 15 | command : ar_system_command, 16 | build_by_default : true, 17 | ) 18 | -------------------------------------------------------------------------------- /yaloe/module.cook: -------------------------------------------------------------------------------- 1 | /* 2 | * UCSD p-System Operating System 3 | * Copyright (C) 2010 Peter Miller 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the ucsd-psystem-os project nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | yaloe/globals.text: system/globals.text 31 | { 32 | cp [resolve [need]] [target]; 33 | } 34 | 35 | cascade yaloe/main.text = yaloe/globals.text; 36 | --------------------------------------------------------------------------------