QNX

I came across this card recently and it brought back a flood of memories. I spent a lot of time with QNX. But what is QNX? And what is this card for?

QNX is pronounced “cue-nix”. It was developed as a real-time operating system based on the UNIX operating system. It was started by two people, Gordon Bell and Dan Dodge, who founded Quantum Software Systems in the early 1980s. They wrote QNX, which I suppose stands for something like “Quantum UNIX”.

But what IS QNX?

Some definitions. An operating system is what runs your computer. Windows is probably the most well-known operating system (often abbreviated to “O/S” or “OS”). It schedules programs to run, controls your display, and hosts driver software for your mouse, graphics card, disk drives, and so forth. Other well-known operating systems include UNIX, OS/2, and DOS. Your phone has an operating system – likely either iOS from Apple or Android from Google.

A real-time operating system (RTOS) is a specialized version of an O/S that is optimized to perform tasks rapidly and “on time”. Real-time operating systems offer guaranteed response times for programs and aren’t intended for general use like Windows is. Your car probably has a real-time operating system in it.

QNX was a relatively small operating system, capable of starting from a single floppy disk. You could write software for it in assembler or in C, and it was “UNIX similar” in that many of the commands you use looked like UNIX commands.

Multitasking was built in, of course, being a UNIX-like system. QNX was very strong in messaging between programs, by design.

My first exposure to it was on a project for the Courtenay Bay #4 power plant in Saint John. A company called Maritime Nuclear was developing a new control system for the unit, based on QNX. I and another gentleman (Ian) were assigned from NB Power to help out. I wrote some code for it and in the end, I ended up maintaining the system after it was commissioned, until #4 was finally retired years later.

During that time, I developed a data acquisition system on QNX to read chemistry data from the plant’s Allen-Bradley PLCs, record the data on disk and do reporting and graphical trends. I guess it was like PI in a way. I wrote it in C and updated it over the years, and eventually it was installed in the Dalhousie plant as well. I gave it the clever name of “DAS”, Data Acquisition System.

Over time QNX evolved from the version that I knew (QNX 2) to QNX 4 (“Neutrino”). Today QNX is alive and well and living in many automobiles and other systems. You won’t see a user interface – it’s “embedded” within many devices. I think it’s owned by Blackberry now.

Anyway, back to these cards.

These are what we called ASCII charts. Each character in the chart has a number associated with it, from 0-255 decimal or 00-FF hexadecimal. For example, capital A is decimal 65, the semicolon character ; is 59, lowercase a is 97, and so on.

You needed these back then when you were, say, building a serial string in code to send though a modem. Suppose you wanted to send a specific character string to a DEC VT100 serial terminal to turn “bold” on. That’s the “escape” character (27 decimal) followed by a left square bracket [, the digit 1, and a lowercase m. In BASIC you might build a string as:

A$ = CHR$(27) + CHR$(91) + "1m"

Believe me, I used this chart a lot when I was writing programs “back in the day”.

Today you can look ASCII charts up online. Kids these days, they have it so easy. 😉

This QNX ASCII card is one of the few keepsakes I’ve kept from my computing career, to remind me of good times… like writing low-level multitasking code in C on QNX.

2 thoughts on “QNX”

  1. Hi, Steve-

    Well-written article – those were the good times indeed. Wikipedia has an entry on QNX (https://en.wikipedia.org/wiki/QNX). That in turn points to a 2006 article on QNX in nuclear plants: https://www.itbusiness.ca/news/nuclear-plant-powers-up-on-real-time-os/9084.

    When I was working with Landis & Gyr RTUs I was surprised to find out that they used a tiny real-time OS inside.

    I never needed to learn C, but I did a lot of programming in PL/M, Turbo Pascal, Perl and of course FORTRAN. Ah, the memories 🙂

    – – – Peter

    • Landis & Gyr, there’s a name I haven’t heard in a long time.

      Turbo Pascal was awesome. I liked C more than Pascal but the Borland IDE was amazing.

Comments are closed.