OS-9 Lives!

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?


9 thoughts on “OS-9 Lives!

  1. Steve Stroh (Wordpress)

    I suggest posting here – I’m already following your blog with my RSS reader.

    1. Allen Huffman Post author

      Thanks! It would be easier for me to keep it here, and with Categories people could still find just the posts on Microware OS-9. I may just redirect the os9al.com domain here, for search engine reasons.

  2. William Astle

    printf() makes the binary so much bigger for two reasons. One is because it has to bring in the whoke buffered IO infrastructure for stdio. The other, possibly bigger, reason is that printf() itself has all the code to convert various argument types into formatted text. Presumably you’re seeing the size difference because the C library is statically linked and the linker and library are set up so that bits that are not needed can be excluded from the final binary.

    1. Allen Huffman Post author

      I was actually talking about the 2K just to do a system call :-) Ultra-C had some unique features. I turned everything into I-Code, a binary representation of the programs logic. Then it had an I-Code optimizer, before turning it into assembly source and going through the assembly optimizer. Microware provided I-Code versions of their libraries, allowing you (if you wanted and had the time) to link a massive I-Code project where all code could be optimized together… It was way ahead of it’s time, compared to other compilers of the day.

      1. William Astle

        Indeed. I expect there’s a nontrivial amount of code involved in setting up to call main and handling the exit back to the system. Not to mention whatever overhead there is in the binary format.

  3. Brian H

    I’ll read new content related to OS-9, no matter where you post it :)

    What hardware are you using for OS-9 (besides CoCo 3)?


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.