Welcome back to the days when an IBM Compatible PC required a floppy disk just to start up. You would boot to PC-DOS (on an actual I.B.M. machine) or MS-DOS (for a clone, like the Tandy 1000 that had just come out in 1984 as the first PC compatible for under $1000). And … then what?
Just like there wasn’t much you could do with a PC with only a DOS boot disk, having just OS-9 is rather limited as well. Beyond typing some commands, what could you do?
There was a simple line-based text editor that would let you make text files. You could then “list” the text file and have that redirected to a printer, if you had one.
I guess you could say this was very limited word processing. Just without much word processing (though the EDIT command has search and replace functions).
There was also a 6809 assembler and debugger. You could write programs in 6809 assembly language.
And that was the very first time I ever wrote an OS-9 Level 1 assembly language program, and also the first time I ever used the asm assembler. I was more familiar with the rma assembler that came out for OS-9 Level 2 on the CoCo 3.
What else? Well, just like DOS, if you wanted to do more, you’d need software. Initially, Radio Shack didn’t sell anything for OS-9 other than BASIC09. Investing in that would allow someone who knew normal BASIC to start writing programs for OS-9. (I plan to do a “Converting Color BASIC to BASIC09” series at some point.)
But it was still neat.
Multi-User
Multi-user support is great, but if you only have one keyboard it won’t get you very far. But, OS-9 came with drivers for the CoCo’s banger RS-232 port, and also a “time sharing monitor” program that could monitor such serial port and then launch the “login” program if a terminal was hooked up to such serial port.
You could plug up an RS232 terminal to the CoCo’s serial port, and then launch “tsmon /t1 &” (the ampersand made the program run in the background so the shell prompt would return immediately). Now both you at the keyboard and another user via the serial port could be using the system at the same time. (Albeit at 300 baud.)
Cool.
If that terminal was another CoCo, then a remote login might look like this:
Above, I added a new entry to the PASSWD file for “ALLEN” with a password, and made new directories /D0/USERS/ALLEN. I set that login entry to point to that directory so when I logged in, I would have been changed in to /d0/USERS/ALLEN ready to make new files there.
It’s a bit more work than this to be useful, but that’s basically the idea. It was really a game changer compared to using BASIC in ROM.
Conclusion
So what could you do with this 1984 OS-9 Level 1? Write programs in assembly, or buy BASIC09 and write programs in that langauge.
However, since text-based OS-9 applications were compatible across hardware, there were actually existing OS-9/6809 programs that could run on the CoCo. Third party software specifically for CoCo OS-9 would soon follow, which was interesting because CoCo OS-9 could do graphics.
Since most of us will not have a 64K Radio Shack TRS-80 Color Computer laying around, as well as a disk drive and the original OS-9 floppy disks, I suppose running an emulator on your PC/Mac/Linux machine will have to suffice.
I personally use the XRoar emulator since I can run it on my Mac, Windows PC or Raspberry Pi. It allows me to emulate everything from a 1980 4K CoCo with Color BASIC 1.0, on up to a 512k CoCo 3. It has been invaluable in articles I have written, because I can quickly switch between Color, Extended and Disk BASIC systems of various versions using various amounts of RAM. There are other options available such as VCC for Windows, or the cross-platform MAME, but I do not know the specifics of how (or if) they can emulate an old 64K CoCo. (I think VCC is CoCo 3 only.)
Over at the Color Computer Archive, disk images have been preserved from the original V1.00.00 release of CoCo OS-9:
There was a later V1.01.00 update, and then an even later V2.00.00 update, but I want just just focus on what 1984 had to offer.
Inside that .zip file you will find two disk images:
OS9L1V1B.DSK – boot program (for Disk BASIC 1.0 users) and disk drive speed test utility.
OS9L1V1M.DSK – the actual OS-9 operating system itself, contained on this 156K 35-track single sided disk image.
As long as your CoCo or emulator is set to have 64K and Disk Extended Color BASIC 1.1, you can just mount the second one (OS9L1V1M.DSK) and then type “DOS” to boot in to OS-9. It will take awhile, since we are also emulating a slow floppy drive.
A “set time” utility is there asking for date and time — anyone here old enough to remember with early PCs all did the same thing as they booted to PC-DOS? Life before realtime clocks – the struggle was real!
Sadly, the set time utility is not Y2K compliant and will not let you enter “22” to mean 2022. You can type something like “22/7/27 8:58” but it will treat that as the year 1922.
I should point out that, internally, it seems the clock code understood years past 2000 — but the utility did not allow you to enter them. If you set the time to just before midnight on December 31, 1999, then wait, you will see it rolls over from 1999 to the year of 19100:
The NitrOS9 project, which has created an open source update from the old OS-9, has fixed all these issues. Anyone interested in running OS-9 on a CoCo these days should be using that, but for this article, we will be sticking strictly with stock OS-9 as it existed in 1984. Which means maybe I should have entered the year to be 1984…
But I digress…
OS-9 Beginner’s Guide
I used to teach week-long courses on OS-9 for Microware, but we’ll keep this article much simpler and just look at commands and how the disk directories are set up.
As mentioned earlier, there is a “set time” utility, and in the previous screen shot you can see I used a command called “date” which will display the date. Typing it with the option of “t” added — “date t” — will display the date and add the time at the end.
If you type “dir” you will get a directory of the OS-9 disk:
OS9:DIR
DIRECTORY OF . 00:05:38
OS9BOOT CMDS SYS
DEFS STARTUP
Unlike Disk BASIC, OS-9 has a real file system that support longer filenames, upper and lowercase, subdirectories and much more. Since the CoCo VDG chip lacked true lowercase characters (lowercase existed, but would be displayed as inverted uppercase characters), by default CoCo OS-9 displays everything in uppercase even if the underlying text is using lowercase. You can type commands in upper or lowercase since the file system is not case sensative.
We see five filenames, but can’t tell if they are files or directories. There is a convention in OS-9 to make filenames lowercase, and directory names UPPERCASE. Since we can’t see the difference, we can use the option “e” on the dir command to display a longer listing:
OS9:DIR E
DIRECTORY OF . 00:08:28
CREATED ON OWNER NAME
ATTR START SIZE
==============================
83/06/02 1921 0 OS9BOOT
------WR A 3032
83/06/02 1956 0 CMDS
D-EWREWR 3C 620
83/06/02 2002 0 SYS
D-EWREWR 164 A0
83/06/02 2002 0 DEFS
D-EWREWR 17F C0
83/06/02 2003 0 STARTUP
----R-WR 15F E
Yuck! But we’ll get to what this means in a moment. You will see the screen pauses at the end. This is a feature built-in to OS-9 and it can be turned on or off. Press SPACE and you will see the listing continues, but there wasn’t anything left other than an empty line before returning to the “OS9:” command prompt.
Looking at that listing, if we made it expand to a wider display, it becomes much easier to understand. It might look like this on a 40 or 80 column OS-9 system:
DIRECTORY OF . 00:08:28
CREATED ON OWNER NAME ATTR START SIZE
=====================================================
83/06/02 1921 0 OS9BOOT ------WR A 3032
83/06/02 1956 0 CMDS D-EWREWR 3C 620
83/06/02 2002 0 SYS D-EWREWR 164 A0
83/06/02 2002 0 DEFS D-EWREWR 17F C0
83/06/02 2003 0 STARTUP ----R-WR 15F E
CREATED ON – The first column is the date (YY/MM/DD) and time (HHMM) the file/directory was created.
OWNER – The second column is the owner of the file/directory. OS-9 Level 1 is a multi-user system, and each user can have its own unique user number. 0 is reserved for the administrator (super user).
NAME – The third column is the file/directory name. OS-9 Level 1 allowed filenames to be up to 28 characters long, and use upper and lowercase. Spaces are not allowed, and there are some other restrictions, like files cannot start with a number and most special characters are not allowed. But still, far more advanced than DOS was.
ATTR – Attributes of the file. This is how we can tell if something is a file or a directory. There are eight attributes, and the first is D if it is a directory, or – if it is a file. We can skip the next one, and focus on the next two sets of 3 attributes. They are “EWR” — the first three are PUBLIC Execution (for binaries), Write (writeable), and Read (readable). The next three are the same but for the OWNER. Thus, you can have a file that ONLY the user can read, or everyone can read. You can make a file that only the user can write to, but the public can read but NOT write to. The same thing for directories. Private directories could exist, usable only by the owner, or public, that other users on the system could read and/or write to.
START – This is a hexadecimal value of what logical sector the file/directory starts at on the disk system. OS-9 splits a disk up in to logical sectors of 256-bytes each. We don’t need to worry about this.
SIZE – This is the file size, also shown in hexadecimal. We see the “startup” file is E (&HE to BASIC users, or 0xE to C programmers) long – 14 bytes.
Here are what those files are:
OS9BOOT – The OS-9 boot file, which contains the kernel, device drivers, etc. This will be all the files necessary to get the system up and running to the OS9: command prompt.
CMDS – We see that this is a directory. It contains various command line utility programs.
SYS – Another directory. This one contains system text files.
DEFS – Another directory. This one has definition text files used by the assembler/compiler and such.
STARTUP – This is a text file with public Read and owner Write/Read. It is basically AUTOEXEC.BAT for OS-9.
Let’s try the “list” command on the STARTUP file, which we know is 14 bytes long:
OS9:LIST STARTUP
SETIME </TERM
The contents of the file is displayed, much like using “cat” under Linux or “type” under MS-DOS. We see the contents is one line, “SETIME </TERM” and if we counted those characters, we’d get 13 characters. The file size is 14, because it contains those thirteen characters plus a carriage return at the end of the line.
By default, OS-9 will boot and then run whatever is in this STARTUP file. This allows us to customize things if we wanted to, or remove that set time prompt completely.
Let’s see what is in the various directories.
CMDS
OS9:DIR CMDS
DIRECTORY OF CMDS 00:26:46
ASM ATTR BACKUP
BINEX BUILD CMP
COBBLER COPY DATE
DCHECK DEBUG DEL
DELDIR DIR DISPLAY
DSAVE DUMP ECHO
EDIT EXBIN FORMAT
FREE IDENT LINK
LIST LOAD LOGIN
MAKDIR MDIR MERGE
MFREE OS9GEN PRINTERR
PROCS PWD PXD
RENAME SAVE SETIME
SHELL SLEEP TEE
TMODE TSMON UNLINK
VERIFY XMODE
There is quite a bit available! We see some commands that may look familiar — like DATE (show the date), DEL (delete a file), COPY (copy a file), DIR (directory), DELDIR (delete directory), ECHO (echo text), LIST (list a file), MAKDIR (make directory), RENAME (rename a file) and so on. OS-9 has a full file system with most of the standard commands you would expect.
If you have ever used “CHKDSK” on a PC or “fsck” on Linux, you will find OS-9 DCHECK familiar. If you have ever merged files on a Linux system, MERGE will be familiar.
OS-9 is very Unix-like in design, and with Linux being based on UNIX, it will have some familiar aspects to a Linux user.
We will explore these commands later, but let’s keep looking.
SYS
OS9:DIR SYS
DIRECTORY OF SYS 00:33:34
ERRMSG PASSWORD MOTD
Not much there. All three of these are text files.
ERRMSG – Contains a text listing of error messages (OS-9 will use an error number like ERROR #216, and this text file will show you that it means “PATH NAME NOT FOUND”.) You could type “LIST SYS/ERRMSG” if you wanted to see them all. You can also type the command PRINTERR to activate long error messages. Now instead of just getting “ERROR #216” it will be followed by the text description from the file. This will make error messages slower, though, since each time it will have to seek through the text file to find the entry and display it.
PASSWORD – As a multi-user system, OS-9 has a password file that can have entries for each user. You could create a password file with an entry for “admin” that would let them log in, change to the user’s “home” directory, and set their user ID to 0 (super user). Or you could make an entry for “bob” that sets his home directory somewhere else and makes him user 42, non-super user. Type “LIST SYS/PASSWORD” to see what is in there. You will see nothing is encrypted. Ah, those early days of operating systems! This file is used by the “login” command.
MOTD – Message of the Day text file. This file will be displayed to a user after they log in using the login command. We don’t see it because by default this OS-9 just boots directly to an OS9: command prompt.
DEFS
OS9:DIR DEFS
DIRECTORY OF DEFS 00:39:53
OS9DEFS RBFDEFS SCFDEFS
SYSTYPE
There are text files used by the 6809 assembler. They are sorta like .h header files in C. They contain various text definitions for bit values or whatever.
OS9DEFS – Definitions for the operating system.
RBFDEFS – Definitions for the “random block file” manager (disk).
SCFDEFS – Definitions for the “sequential character file” manager (console, serial ports, etc.)
SYSTYPE – Definitions for the system.
Unless we are programming for those, we would never use these files.
So what can we do?
In the next installment, we’ll explore some of the commands, and discuss some of the things that make OS-9 very unique (and the reason why it can run as a disk-based operating system, or completely out of ROM with no file system at all).
1984 was a big year for home computers. Not only was the Apple Macintosh released with that famous 1984 Superbowl ad, but Microware’s OS-9 operating system made a debut at Radio Shack.
Des Moines-based Microware had created a product called RT/68 for the Motorola 6800 processor. It was advertised in the February 1977 issue of Byte Magazine:
This led to them working for/with Motorola to create a high performance BASIC programming language for the Motorola 6809 processor. This led to them creating an operating system to support it. That operating system was called OS-9. (I assume the 9 was chosen because of the 6809 processor.)
I do not know the details of how it happened, but at some point Tandy/Radio Shack and Microware decided to bring out a version of OS-9 for the Radio Shack TRS-80 Color Computer. It was introduced in the 1984 Radio Shack catalogs, along with a 64K version of the Color Computer that was needed to run it. (OS-9 required 64K on the CoCo, but OS-9 itself could be embedded in ROM to run on industrial equipment with as little as 4K RAM.)
OS-9 was listed in the 1984 Radio Shack catalog, as well as the two 1984 Radio Shack Computer catalogs (RSC-10 and RSC-11):
Here is how the 64K version of the Color Computer was presented in the 1984 catalog:
And this is a how OS-9 was described in the short entry of the 1984 catalog:
At the time, I remember my Radio Shack salesman telling me OS-9 was needed to make full use of the 64K in my Color Computer. The Microsoft BASIC ROMs in the CoCo were limited to using less than 32K, regardless of if you had more than that installed in your machine.
The computer catalog went in to more details on both the machine and the operating system:
New 64K CoCo in the OS-9 in the Radio Shack Computer Catalog RSC-10OS-9 in the Radio Shack Computer Catalog RSC-10
I found it interesting that the same entry appeared in the second1984 computer catalog (RSC-11), but without the color. (I did not go through it word-for-word to see if there were any text changes, so let me know if I missed something.)
Radio Shack Computer Catalog RSC-11
Humble beginnings! Over the next few years, CoCo OS-9 offerings would continue to grow, adding compilers like C, and eventually a more advanced OS-9 Level 2 for the CoCo 3 with an optional mouse-driven GUI.
But in 1984, there was far less you could actually do with OS-9 except write programs for it in either 6809 assembly (notice the assembler was included) or the sold-separately BASIC-09. (It was actually just “BASIC09” in the documentation, without the dash.)
I thought it might be fun to boot up this original version of CoCo OS-9 and see what all it could do.
I don’t know many details, but it seems that buying the hardware and OS-9 license should cost much less than what we paid to get it on a CoCo back in the day ;-)
Lately, I have been “playing” with the current version of Microware’s OS-9 realtime operating system. It is still very familiar to what I last knew when I left RadiSys/Microware in 2007, but with many interesting updates.
It took me a bit to remember how to use Ultra-C (Microware’s strict-ANSI compiler) and native operating system calls:
OS-9 says “Hello, world!”
After doing the initial test using printf(), I decided to bypass the standard I/O library and see how much smaller the code would be. (From 12K to 2K, for those asking.) Nice. Though I’m still not sure why C produces such big code for such simple things ;-) Shouldn’t this just load a few registers and jump to an OS hook?
But I digress.
I expect I’ll start posting articles about OS-9, including high-level overviews of its architecture and things that make it unique. There are lots of things it offers that Linux doesn’t, though obviously, Linux wins hands-down when it comes to system support and full blown apps.
I ask of you: Should I post my OS-9 articles here, or should I split them out and make a blog on my old www.os9al.com site? Or maybe I just get rid of that site and archive those pages here, then point that domain to Sub-Etha Software?
According to a post made today by Allan Batteiger in the Microware OS-9 public group on Facebook, we may finally see the return of a version of OS-9 for hobbyist use.
The message announced the pending release of OS-9/68K to version 4.0, and OS-9 for ARM, PowerPC and X86 to version 6.1. Notable updates including an new networking stack supporting IPv6, and updates to OPENSSL. He also mentioned work to get the CLANG/LLVM compiler generating code for OS-9 PowerPC and ARM, with an alpha release coming later this year.
Of interest to the hobbyist community:
“Work has been proceeding on the OS-9 for Makerspace. We now have USB & Networking working on the Raspberry Pi 1 & 2 boards. Work has started on the Raspberry Pi 3. Also work is moving forward on the BeagleBone Black and Asus Tinker boards. The plan is to release preliminary versions of the Makerspace OS-9 yet this year.”
For those of us who used to run OS-9/6809 on the Radio Shack Color Computer, or OS-9/68K on systems like the MM/1, this is pretty exciting news. A low-cost Raspberry Pi could be very fun to play with, though it would be missing the advanced terminal and screen controls that we had under OS-9 Level 2 (CoCo) and K-Windows (MM/1). To me, porting that functionality would be one of the first projects we should undertake.