OddThinking

A blog for odd things and odd thoughts.

Rational 1000: When Keyboard Shortcuts Attack

This is one of a short series of nostalgic reminiscences about the Rational 1000.

I remember the days of using a terminal over a modem on a DOS machine.

CTRL-C was the standard “cancel” command in those days. However, it wasn’t uncommon for CTRL-C to be ignored. If you were using a modem, the signal may have got lost, or if you were using a DOS machine, sometimes the key was ignored if the software happened to have been distracted when you pressed the key. So, it became ingrained that the shortcut for cancel was effectively “CTRL-C! CTRL-C! CTRL-C!”.


Sometimes, computers couldn’t keep up with the information flow coming out of the modem at an unbelievable 30 characters per second, so the XON/XOFF protocol was used. CTRL-S (XOFF or Transmit-Off) would tell the other end to stop for a bit. CTRL-Q (XON or Transmit-On) would tell the other end to continue.

Inevitably, the system would get out of sync – maybe a CTRL-Q was lost in the line noise. So, if the flow of data froze up unexpectedly, sending an extra CTRL-Q, to thaw it (or more accurately, hitting CTRL-Q CTRL-Q CTRL-Q on the keyboard) would often provide relief.


It wasn’t that long after these dark ages that I started to use a Rational 1000.

An early lesson was that the Rational 1000 was sloooow! Just because it appeared to lock up all the time, doesn’t CTRL-Q would unlock it. In fact, hitting CTRL-Q would launch some sort of help system, which itself was really, really slow. It took me a while to learn that my habit of hitting CTRL-Q repeatedly didn’t speed things up – it just ensured that it would be a great time to catch up on my reading while I waited for the machine to be ready!

Eventually I rebound the CTRL-Q key to print a quick message in the status bar, simply saying “Hey! Quit doing that!”


On the Rational, CTRL-G set the current foreground job off running in the background. ALT-G killed the current foreground job. Well, more accurately, ALT-G started out like CTRL-G, by setting the foreground job off running in the background, and then it started a new “assassin” foreground job. The assassin process would hunt through the process list for the targetted job (that was running merrily, at a lower priority) and kill it from behind when it least expected it.

Now think what happens when a system like this meets a compulsive quitter like me. I’d want to abort a slow process, so I would emphatically press ALT-G ALT-G ALT-G!

The first ALT-G would put my foreground task into the background, and trigger an assassin to sneak up behind it. Before it got too close, the second ALT-G would put the first assassin in the background! A new assassin would be hired to put a hit on the first assassin, which itself would be trying to find the original process. Before that drama played itself out, the third ALT-G would put the assassin-killer job in the background, and start a third assassin, hunting the second one. There was nothing to do at this point but wait to see how it played out – which would finish first? The first assassin (killing the job), the third assassin (leaving the first assassin to kill the job) or the second assassin (leaving the job running). Or perhaps the original job, left unmolested for so long (although starved of much CPU with so many processes running) would actually complete, and die of old age!


I, at least, was familiar with the basic EMACS keystrokes, which the Rational 1000 supported (on top of other alternatives). I was familiar with CTRL-K to “kill” the rest of the line (i.e. cut the rest of the line and store it in the clipboard/region buffer) and CTRL-Y to “yank” back the buffer (i.e. like paste). Occasionally a cow-orker, unfamilar with the Emacs conventions would make a typo and hit Ctrl-Y. The status bar would pop up an informative message “Nothing to yank!” which would leave the cow-orker – more familiar with the more earthier definitions of “yank” than the EMACS one – chortling with delight.


A cow-orker was pulling his hair out on an elusive bug in his driver software for many hours, and I came over to lend a second pair of eyes. The program would start off fine, he would be communicating happily with the hardware device. The hardware would occasionally send a message that would make his software crash. It would simply stop responding, and he had no way of explaining it. It took a few minutes for him to walk me through it, until he got to the message that made it freeze. “Whenever this field in the packet is set to this, it just jams up,” he explaining.

“Oh,” I said, “Whenever it sends a byte containing 19? Sounds like CTRL-S to me. Let’s look at how you open the serial channel.” Sure enough, he had incorrectly opened the serial channel to respect XON/XOFF signals, and the Rational 1000 was politely waiting for the hardware to send a CTRL-Q before it transmitted another byte.

My cow-orker had never heard of XON/XOFF before, and looked at me with glassy-eyed amazement that I could simply notice the number 19 in a byte-stream, and point to an unrelated line of code that was causing the problem.

Despite all of its tribulations, my previous experience with modems paid off.


Comment

  1. The CTRL-Q re-binding reminds me of a friend who made a y.bat file that printed “you can stop pressing ‘y’ now”.

Leave a comment

You must be logged in to post a comment.