Subject: fwd:Alternative mac operating system
To: None <macbsd-general@NetBSD.ORG>
From: kr <email@example.com>
Date: 12/11/1994 02:53:22
This might be of interest to some of you, as a "cross"-development platform.
>Date: Sat, 10 Dec 94 06:34:01 PST
>From: Jonathan.Kimmitt@camcon.co.uk (Jonathan Kimmitt)
>Subject: Alternative mac operating system
>X-Listprocessor-Version: 6.0c -- ListProcessor by Anastasios Kotsikonas
>Since this mailing list is about alternative mac operating systems,
>I thought subscribers might like to know about a new program,
>similar to MacMiNT, which is now available for Quadra Class macs
>As well as the nic.switch.ch site, I have uploaded the latest version
>to suniams1 in the incoming/Patmos directory
>Although superficially similar, it works in quite a different way to
>MacMiNT, and it is totally incompatible with VM, RamDoubler, etc.
>At the moment it also crashes with Appletalk on but I mean to fix this.
>Most software (including gcc) will compile with no source code changes.
>Even programs that use pipe(), fork(), and mmap() should work in theory.
> Patmos "Protected address translation mode operating system" is an
>application that brings the advantages of protected mode programs to your
>class macintosh. By the simple expedient of taking over the memory management
>unit of the 68040 in a very simple kernel (<100K in size), we immediately gain
>compatibility with the BSD unix program environment. The advantages of
>(a) You can run certain programs (such as /bin/sh) designed for MacBSD
>(b) You can compile almost all GNU software including C and C++ without
>modifying the source code in any way
>(c) All programs run with a flat 32-meg address space, with no worries
>segments or the other mac paraphernalia
>(d) The majority of program bugs can be caught cleanly without crashing
>(e) All your files are shared between Patmos and MacOS so you can edit using
>your favourite mac editor, then immediately compile in Patmos without
>reboot or copy files around.
>The downside is that not all macs use the memory management unit in the same
>way, or even have the same kind of MMU, so Patmos may not run on your
>mac model. However, since the kernel source code is very small, the task of
>adapting it to a new environment is very simple, and once achieved, all
>application programs running in user mode are enabled to run without even
>Currently supported kernel functions:
>Protected mode addressing
>32Meg virtual address space
>Berkley a.out executable model (argc, argv, envp) etc.
>linear program growth (sbrk,mmap etc.)
>dynamic process sizing (no need to calculate size requirements in advance)
>HFS (hierarchical filing system) interfaced to BSD syscalls (open, read, write
>Partially supported but still buggy:
>dynamic stack resizing (true alloca etc.)
>Not supported (yet)
>maths co-processor support
>termcap (non glass TTY)
>Currently ported software
>C, C++ (gcc-2.5.8)
>ld,ar etc. (binutils-1.7)
>ls,mv,rm etc. (fileutils-3.1)
>sort,head,tail etc. (textutils-1.3)
>If you have the latest version of Patmos it will be organised
>into 3 self-extracting modules:
>You can obtain this software by anonymous ftp
>from nic.switch.ch in the /software/mac/src/Patmos subdirectory
>The absolute minimum you need to do anything is the kernel (the Patmos
>application) and shell (sh). This will allow you to determine whether
>run on your machine. These files are present in the /bin.sea archive, together
>with most of
>the small programs that you can typically run from a UNIX shell
>The /usr.sea archive contains everything needed to compile and run a C program
>that uses the stdio library. This includes everything mentioned above including
>the compiler itself.
>The /src/Patmos.sea archive contains what is needed to re-compile or debug
>the Patmos kernel. You will also need THINK C 5.04 or later. For your
>the library include files are already converted to THINK format to drop right
>your THINK-C folder. You will need to turn off the normal THINK-C standard
>and headers because they are incompatible with BSD UNIX on the whole. This can
>done by putting brackets () around the (C libraries) folder in the THINK
>This procedure is documented in the THINK manuals.
>Create a top level folder, called 'root' for example on your hard disk.
>archive(s) into this folder. Copy sh from the bin folder into the root.
>It is desirable but not essential to create /tmp and /var/tmp directories to
>hold temporary files for the compiler.
>You should end up with a structure much like this.
>The root directory '/' for Patmos will be the folder containing the first file
>opened. After startup. This is conveniently done by dragging and dropping the
>'sh' in the 'root' folder onto the 'Patmos' Application.
>You can use other directory structures if you wish but this is untested.
>If you have an older version of Patmos the structure and archive names
>may be slightly different but things should still work the same.
>You do not need to set the memory size requirements of Patmos programs
>but you do need to set the total partition. This should be as large as possible
>leaving room for the system, your favourite editor, and the finder.
>3000K should be adequate to compile a noddy program
>6000K would be typical if you are using make and/or build scripts
>9000K should be sufficient if you want to rebuild the compiler or your latest
>multi-megabyte epic project.
>Turn off virtual memory, RAM doubler, Appletalk before attempting to run
>Patmos. Other obscure system extensions could interfere as well.
>Make sure you boot in 32-bit moe. I hope to have a version
>compatible with Appletalk soon, but Patmos takes over the MMU so it is
>fundamentally incompatible with Apple virtual memory and RAM doubler.
>You can still use Autodoubler etc. if you have it to reduce the size of your
>executables. Since all filing system calls are via the toolbox, the operation
>of this type of program is transparent to Patmos.
>At startup, the Patmos application will perform some basic checks to see
>machine seems suitable before continuing. It will also consult a database of
>tested machines to warn you if your machine has ever been tested before.
>add to this database in the application by editing STR# resource 128. Just add
>the name of your machine as it appears in the "About this macintosh" box. Once
>you are happy Patmos is working, you can startup by simply dropping the sh
>program on the Patmos application. Note that the location of the sh program
>becomes the root of the filing system for that session, so you will need two
>copies of sh, one in your root folder, and one in your /bin folder.
>To compile and run a program you will need
>You can prepare your source code with an editor such as the freeware BBEdit-
>2.2.2, be sure to choose the 'UNIX line endings' option when you save the
>file. A typical compilation command would be
>gcc plugh.c where plugh.c is your program
>this will generate an executable in the current directory, called a.out by
>Run this program by typing
>The program's output will appear in the console window, or else a diagnostic
>message giving an error, and the CPU registers at the time of the error,
>possible, the offending instruction.
>If you are unfamiliar with the usage of the GNU software, all the source code
>and manual pages and documentation should be available from the same site you
>got Patmos from, as well as many other places. The most convenient way to get
>new source code to compile and run is on the many CDroms that are available.
>The majority of recent mac
>models use a cut down 68LC040 with no maths co-processor so the kernel
>and most programs assume the co-processor is unused. You could alter
>the kernel to save the FPU context if you have a full 68040 and this would
>then work in conjunction with gcc -m68040. You might need to edit the gcc specs
> The Patmos kernel is copyright c1994 by Jonathan Richard Robert
>also incorporates as well as the author's work, libraries which are copyright
>the University of California (Berkley). The dissassembly that you get when a
>program crashes is copyright Free Software Foundation, as is the majority
>application software including the compiler. You may freely copy this software
>but you must make the source code available to anybody you distribute this
>software to, or tell them where they can get it. For full details, see the
> If you like this program, send a postcard with your suggestions for
>improvements, what mac you tried it on, etc. to
>4 Moyne Close,
> Or if you are excessively lazy, you can send e-mail with your feedback to