Tue Aug 3 10:46:19 2004 Old computers,
old ads, old memories - and short programs
Posted by Tony Lawrence
Referencing: http://oldcomputers.net/
Take a trip down memory lane. I liked the old ads particularly - I remember many of those.
I'm sure that the "new kids" can't imagine actually writing programs in 2K of memory or less - truth be told, even though I did it, I can't imagine it either.
Of course, we were big on assembly language - and even direct machine language in extreme circumstances. Doing things tight was important, so self modifying code was never out of the question at all. It may have been beyond difficult to understand, but by gum it fit!
The shortest useful program I ever wrote was for Tandy's Model II. I worked at a Tandy Computer Center (Chestnut Hill, MA), so there were several Model II's around the showroom. A Model 16 ran Xenix, but the II's ran TRSDOS.
TRSDOS was a bit short of "user friendly". For example, if you wanted to delete a bunch of .DAT files, you'd type "KILL */DAT". Because the designers of TRSDOS had low expectations for your intelligence, the KILL program would ask you to confirm every single deletion. There were other commands that were similarly annoying, and of course these machines, while speedy for their day, still took a bit of time to do things, especially if it involved disk I/O (the disks were 8 inch floppies, of course). So the natural behavior of most people who had typed such a command was to immediately follow it with a long series of quickly typed Y ENTER's or N ENTER's and then walk away. The command would read its responses from the filled up keyboard buffer. Automation, circa 1982.
But often the command would run out of questions before the keyboard would empty its buffer. The Y's or N's were then fed to TRSDOS itself, which would take great offense and respond with an "ERROR 31" (File not found) message. You'd see the screens filled with these things anywhere Model II's were unattended.
Well, I didn't like that message. It annoyed me, and I didn't think it was good for potential customers to see screens full of errors. Computers were scary enough to most people back then. Now, I could have written something that would feed answers to other programs, but that would have been complicated and no one would have used it. People were used to filling up that keyboard. So I wrote a little program. A very little program.
This was a Z80 processor, and with TRSDOS you could just put machine language bytes on disk and run 'em - no headers necessary, just like DOS .COM programs. The program I wrote was one byte - a hex C9, which is just a RETURN in Z80 language. I named it Y, and copied it to N. Now when the keyboard buffer asked TRSDOS to do "Y", it could. The program did nothing - just returned to TRSDOS, but no error messages were produced.
I later wrote a longer and more complicated version that flushed the keyboard buffer of all input before returning. That was sometimes useful for the case of fat fingered typists or little kids banging away on the keyboard. I've forgotten everything I ever knew about Z80 machine language and TRSDOS, but I do remember C9 - the shortest useful program I ever wrote.
More Articles by Tony Lawrence - Find me on Google+
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
The model II had a 68K MPU? I didn't know that. I thought it was Z-80 powered. Goes to show you learn something new every day.
--BigDumbDinosaur
---August 4, 2004
Ooops - I'm thinking Mod 16!
And C9 is Z80.
Article corrected :-)
--TonyLawrence
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar