|
RSX180This is a system I wrote back in the early 80s, after home-brewing my first 8080-based machine. Before that, my computing experience was mostly limited to programming under the RSX-11M system that ran on PDP-11 machines, and that's the main reason this system ended looking like the DEC OS. It all started as a simple hobby project, but when I saw that the much simpler and slower 8080 could cope with multitasking rather well, I continued developing it (added device drivers, a simple filesystem, etc.) I lost interest and abandoned the project when I got my first copy of MP/M - an elegant, small multi-tasking multi-user OS that maintained for all practical purposes full compatibility with CP/M, something that I always thought would be difficult, if not impossible, to achieve. Recently I found an old backup cassette tape with the code I thought I had lost forever, and the system was resurrected. I ported the original 8080 code to the Z180 CPU, fixing many bugs in the process and bringing the functionality of the system even closer to RSX-11M. Most utilities have been written again from scratch, this time directly in Z80 assembly, since the source either was not present in the cassette tape or could not be recovered. The original filesystem has been enhanced as well (it lacked things like a master index file and file protection mechanism), and made Y2K compliant. Similarities with DEC's RSX-11MRSX180 not only gives the look-and-feel of RSX-11M, including an MCR-style Command Line Interpreter and a set of similar utilities such as PIP, HEL, BYE, Indirect Command Processor, RMD, etc. but the OS itself follows closely the philosophy and design principles of RSX-11M:
Differences with RSX-11MBesides being obviously written in a different machine language, and for a totally different CPU and platform:
Booting the systemIf your P112 has a 3.5" HD floppy drive then you can copy a ready-made RSX180 disk image to a freshly-formatted floppy disk (on Linux you can use e.g. the dd command.) For the starters, use the image with basic terminal support. For best performance format the
floppy first under CP/M, so the sectors will have the optimum interleave
value for the P112 hardware. Otherwise, disk accesses will be very
slow.
Place the RSX180 system diskette on the first floppy drive and reboot your P112: SMC IO chip identified (FDC37C665IR): configuring ROM-code built: 04 Feb 2006 CPU clock: 16.000MHz RAM available: 1024kB. From 00000 to FFFFF ROM shadowed into 1st 32kB P112 1024K RSX180 V6.15 >RED DY0:=LB: >RED DY0:=SY: >MOU DY0: >@SY0:[SYSTEM]STARTUP.CMD >tim 18:18:28 24-Mar-2020 >set /colog=on >set /colog/nocoterm >pip [syslog]*.*/pu:5 >upt Up 0 days, 0 hours, 0 minutes and 16.09 seconds. >@ <EOF> > The instructions in uppercase are automatically generated by the initialization task to redirect the system devices to the boot drive and then to mount the system disk. Then, if there is a STARTUP.CMD command file in the [SYSTEM] directory, it is executed much like RSX-11M does. Using the systemIf you have some basic knowledge of RSX-11M then you'll feel quite at home with RSX180. Care was taken to make the command syntax as similar as possible. Once the system is up and running, users can login into their accounts using the HEL (or HELLO) command. The main (console) terminal remains logged into the SYSTEM
account after the booting process finishes; in order to login into a
different account you'll have to logout first with the BYE
command.
Each user is assigned a directory where he/she can keep his/her files; the directory has the same name as the user name. In addition, users can be identified by their User and Group IDs; users with a Group ID lower than 10 are privileged (much like being root in Unix) and have access to system-management commands. The HELP command displays information about a particular command or utility (e.g. type HELP MCR for help on MCR commands, HELP PIP for help on how to use PIP, etc.) Note that at this point help files are missing for some of the utilities, or the information is not complete. To log off the system, use the BYE command. Like RSX-11M, RSX180 has the concept of Task Directory. Tasks can be entered into the directory by a system manager via the INStall command and removed with the REMove command. Among other things, the directory contains pointers to the location of the task image on disk in order to allow for fast activation. Ordinary users can still run non-installed tasks via the RUN command. As in a real RSX-11M, a number of important system tasks are always active and the system will crash or become unresponsive if any of these tasks are killed. A real RSX-11M will refuse to abort certain critical tasks, but RSX180 will happily let you to do so. Therefore:
Shutting down the systemNormally, the P112 can be safely turned off if RSX180 is idling, active tasks have no open files, and no disk I/O activity has taken place in more than 5..6 seconds (the file buffer flush interval). But in order to ensure a safe shutdown, using the SHUTUP utility is recommended. This special task sends a warning message to all logged-in user terminals, stops the console logger, forces user logout after a defined time interval, kills any remaining active tasks, disables the checkpoint file, safely dismounts disks and halts the system. Installing on a hard disk partitionAlthough RSX-180 can be run from a floppy and still exhibit acceptable performance, running the system from a hard disk partition will give it the benefit of faster disk data transfers and access to a large disk space. Steps:
To automate the above steps, the distribution floppy image contains a SYSCOPY.CMD command file in the [SYSTEM] directory that can be used to duplicate the floppy system on a selected hard disk partition. Programming considerationsSince the Z180 lacks user/kernel mode and memory cannot be write-protected on the P112, RSX180 relies on tasks being well-behaved, and that means that tasks:
There are also some other conventions regarding e.g. I/O:
Filesystem formatRSX180 uses a custom filesystem format which is described in more detail here. The main characteristics are:
Device driversThe following device drivers are currently implemented for the P112:
Basic and Multiplexed terminalsRSX180 can be generated with one of the two variants of the terminal driver:
Bugs and limitationsPlease note that this still is a work in progress. The kernel is rather complete and stable, the system can be booted and used, but there are many unfinished details, basic utilities are still missing features and bugs are very likely hiding somewhere in the code. Some of the limitations were already mentioned above. In addition, there are many unimplemented and/or unfinished features:
Linux toolsVolume handling: vol180 is an utility that can be used to transfer files between RSX180 volumes and the Linux filesystem. The program works in interactive mode, accepting a number of commands to mount volumes, create user directories, import an export files, etc. At the program prompt, type help to list the available commands. fsck180 is a tool that checks RSX180 volumes for consistency and repairs errors in a manner similar to Linux's fsck. Be aware that the current version of the utility is not yet able to fix certain filesystem errors like cross-linked files, but such cases are very rare anyway. The extended terminal driver supports eight multiplexed terminals on the auxiliary port of the P112. On the remote machine, decoding of the data packets is done with the vtcp utility, which makes the individual terminal lines available to the external world via a configurable TCP port. The port supports the telnet protocol, thus a terminal program like putty on Windows or the telnet command on a Linux xterm can be used to connect to the P112. Command syntax: vtcp device [-b speed] [-p port] [-t] [-d] where
For example: vtcp /dev/ttyS0 -b 19200 -p 4000 -t Then you can login on the P112 from the same (or another) machine: $ telnet localhost 4000 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. > >hel User name: Note that you have to press Enter at least once to get the default MCR prompt. The multiplexing protocol is extremely simple, without error detection and connect/disconnect notifications. Nevertheless, it works very reliably provided you don't push the P112 serial speed limits. Since a single TCP port is used, terminal lines are assigned sequentially to TCP connections: each new user gets the first free line. When no more lines are available, the vtcp application will refuse (close) further incoming connections. The fact that there is no connection/disconnection
notifications means that no automatic logout happens when you close the
connection. Thus, never forget to use the BYE command before
leaving, or the next user will have full access to your account!
Last modified 24-Mar-2020. |