1616/OS
I'm a Unix hack, OK? I've been using Unix since 1977 and Unix's elegance
and power still make my wee little toes curl with glee.
1616/OS started out as a "monitor program" and just grew. Yet
even the final version 4.7a met with the operating system's initial design
constraints:
-
Able to run with no disks.
The operating system, editor, shell and assembler ran from EPROM with
only cassette tape storage. Late versions had zmodem in ROM, with the ability
to bootstrap from attached Unix hosts.
-
No hardware memory management.
Executables were relocated when loaded. There was no fork().
fork() was possible - Colin did it when he ported
Minix, but I didn't find a need. No VM, of course.
-
Easy to program in assembly language.
An overview of the 1616/OS feature set:
-
Preemptive multitasking
A simple round-robin scheduler with process groups and per-task prioritisation.
-
Multiuser
User ID management in the operating system, with all the usual authentication
tools in user-mode applications. Since any process can put itself into
supervisor mode, the 68000 always runs in supervisor mode. To prevent non-root
users from busting root, executable files have to be owned by root.
-
Memory management
A simple but surprisingly efficient bitmap-based memory manager.
-
Threads
A process could spawn any number of 1616/OS threads. These were
handled as subprocesses of the spawning thread. Calling exit() when
subthreads were still running was a bad thing to do, because the
thread kept on happily running in released memory!
-
Around 250 system calls to support assembler programmers as well as C programmers.
-
Support for hardware interrupt routines within applications.
-
Signals
These were fairly standard.
-
Runtime installable character and block device drivers
These were used in MGR, in the virtual console application and in the
memory-resident drivers for the memory/SCSI card.
-
Character device driver subsystem supporting tty signals.
-
The 1616 hierarchical filesystem.
-
Standard I/O functions - printf(), fprintf(), getchar(), etc.
-
Cassette tape I/O
-
Drivers for the Z80 disk controller card
-
The drivers on the Z80 side of the disk controller card I wrote in BDS
C. The source is forever lost.
-
Serial drivers with hardware and XON/XOFF flow control.
-
Video driver which emulated a Hayes something-or-other terminal. Flashing
cursor in software!
-
Graphics drivers with windowing, clipping, line draw, circle draw, pixel
draw, offscreen drawing, etc. Supported multiple frame buffers.
-
Non-Y2K compliant time and date routines (so sue me).
-
A wonderful line editor (I still use it, and it's better than yours).
-
Pipes
-
Per-process single stepping via the 68000's trace mode bit.
-
Interesting signal semantics: if you send a signal to a process group leader
it can optionally be sent to all subprocesses.
-
Environment strings
-
An asynchronous interprocess communication mechanism which essentially
sends a blob of bytes to another task and wakes it up if it's sleeping
on a receive.
-
Memory-resident drivers which tuck up above the system stack at boot time.
-
A full-screen non-modal editor. The Unix version hangs around
here.
-
A shell with I/O redirection, pipelines, wildcard expansion, backgrounding
of commands, etc.
-
Shell backquote substitution was provided via a memory-resident driver
extension. (Who remembers why the 'clsub' command printed out "%d backquote
commands from %d EXECs. Why bother?"?)
-
An easter egg! Check rom/ssrom/datetime.c
-
Nifty programmable function keys which can learn-as-you-type.
-
It's now safe to reveal: a backdoor. The inbuilt command ^P^A^AE^X^T^O^E
gives you root. I never used it. Probably couldn't remember
it.
-
Seventy eight built in commands. Here they are:
mdb mdw mdl mrdb mrdw mrdl mwb mww mwl mwa mfb mfw mfl mfa mmove
mcmp msearch base expr go srec help move mwaz cio terma termb serial fkey
setdate date copy syscall delete cat rename dir msave mload tsave tload
dirs itload cd echo mkdir edit ssio quit tarchive pause tverify ascii time
xpath option volumes touch filemode type ssasm assign ps kill wait set
term vmode getz putz geta getb puta
putb printa printb boota bootb
You work 'em out. rom/ssrom/inbuilt.c.
-
Simple scripting. Fancy scripts are done with cscript. cscript
later became CS+, which gave way to CS++, which is here.
-
Joystick routines, audio I/O (stereo via a software switched capacitor
thingy), audio channel selection.
-
Centronics driver
-
Lots of other stuff. What the heck. Just download
the thing.
1616 Applications.
AKPM Home
Andrew Morton, 8 March 1999