Quantcast
Channel: while(0) » learning
Viewing all articles
Browse latest Browse all 2

QuickBASIC: The Lost Years

$
0
0

From 1986 to 1988 I spent way too much time programming in Microsoft QuickBASIC. Thank goodness kids today can easily use any number of useful programming environments that don’t suck nearly as hard as QuickBASIC, but at the time it featured an IDE that was marginally useful and was cheaper than Turbo Pascal, while also being a language my dad and I knew, unlike Pascal. I used it in a few programming competitions at school, with mixed results. It’s lack of pointers made certain data structures awkward.

QuickBASIC 2.0 was the first incarnation I used and the advances over the very old MS BASIC on Commodores and the bundled BASIC on PC-DOS (which I never did much with) were substantial. Usable subroutines and functions, better type control, labels and obsoleting line numbering were the best changes. The “P-Code compiler” they advertised was faster than the old interpreters but not blazing fast. It hardly mattered since the clock speed of the Intel CPUs were doubling every few years and as my dad and I were assembling and selling PC clone computers as a hobby, I spent a lot of time “burning in” the newer, faster machines for our clients (actually mostly doing development) so the speed of any environment was rather unpredictable.

I was also spending a lot of my free time running a BBS, originally on my Commodore 128 using the CNET system, which like so many 6502 software systems was partially written in BASIC and partially in assembly, and that made it possible to modify the BASIC parts easily enough. The BASIC code was mostly the code that controlled the user experience and as long as you didn’t use much more RAM you could modify it slightly to customize your board. I spent a lot of time trying to reorganize the board into sections based on topics, since CNET, like most systems, was designed with a functional top level choice, to let users go to sections for messages, news, or files, each of which would then be categorized. I wanted to let users select what kind of topic then have a way of seeing different content area types based on that topic. I was inspired by large online info-systems of the time like CompuServe and Q-Link.

I could code my changes in the BASIC statements but usually only by careful removal of other code to make up the difference. Support for Kermit file transfers was chucked to make way for threaded message topics. Prompts were shortened to get a few more bytes here and there. The board no longer said goodbye when you logged off, too much code. It was quite difficult and led me to the idea of writing a bulletin board system from scratch on the beefier PC computers using QuickBASIC. I called it something like “NodeBoard” and it would allow the structure of the site to be defined with a set of text configuration files defining the basic navigation tree, made up of types of nodes. The nodes that you could use could define a menu item (a link to a section) a message board, a file storage area, a news/text area, and special actions like operator chat, log-off, or the user set-up screen. This took months during the school year and ended up being the largest single program I had ever written at the time, but parts such as the message editor were never quite good enough (notably also the largest part of the CNET software IIRC). I put all output and input through a set of SUBs that in various stages of development just did PRINT and INPUT and later supported ANSI graphics correctly, via output to the CONS: device.

However, it turned out that QuickBASIC’s support for the serial port device itself, and signals important for modem control, was limited and unreliable, making the whole thing a bit of a waste of time. But it wasn’t developing NodeBoard that first showed me that; it was another program I wrote along the way also related to BBS communication, specifically to take advantage of free long distance calling available to a computer in my dad’s office that had two modems installed on it. The program simply answered the phone, asked me for a login name and password, then connected me to the other modem so I could call BBS’s around the country. From there it was a dumb pass-through (in fact, you had to disconnect from the incoming side to call another number) but quite often it was slow and unreliable; luckily most of the technology was designed for unreliable links and so that wasn’t a big problem. I tried writing an assembly library for the serial communication (like CNET did, in fact) but integrating machine code with QuickBASIC at the time required buying the MS BASIC compiler which I couldn’t afford.

Despite never being able to deploy the NodeBoard BBS outside of a few tests, the flexibility of building the BBS’s interactions in a tree structure from these configuration files was so interesting and powerful that it led me to consider implementing something different: a hypertext system. I had seen TV programs and read articles in magazines like BYTE on such systems and I realized this was where I was heading with my BBS ideas. I had also written a story for an assignment in English class about a future where the US Constitution was hypertext linked to every legal code in the country. (Good luck with that.)

I spent a few weeks writing my own hypertext browser program, HyperMaus, integrating it with some mouse and text-mode windowing routines I called FensterMaus (yes I was taking German in high school). It allowed me to use the new Logitech three-button mouse to click on text links. It was going well, plus I was writing the program on a blazing fast i386 tower PC my dad had put together for a client. This was during the Summer break so I was working on it most nights and often all night. I had just gotten the main point-and-click basis of the navigation functional (but not a history stack) and linked through three test documents over and over; I considered it the most awesome thing I had written up to that time, and I hit the sack just before the break of dawn.

Unfortunately that morning was the one my dad had chosen to deliver the ’386 system to our client. He reformatted the disk drive, and installed our custom menu system and the client’s requested apps on the machine while I slept. I had no other backups of HyperMaus. It was somewhat devastating and the first time (so far the last time) I had lost a project so completely while right in the prime of its development.

Using a C compiler for the first time on the Commodore 128 introduced me to the concept of streaming data APIs and shells, and my CS classes in Pascal turned on the lights on for the power of pointers in manipulating data structures; after these go-nowhere turns with QuickBASIC I had firmly soured on the platform and dropped it (and with it for a while, the entire PC platform.) I turned my attention to programming on the Amiga first in C++ and then later in C. Sounds backward, right? Well, that is a different story.

The last program I wrote in QuickBASIC was a quick hack similar to the previously-mentioned long-distance hack that would multiplex the modem connected to the PC-BOARD BBS running on the same PC, or to my Amiga running UUCP for Internet mail over a serial line null modem connection. That turned out to cause havoc for our BBS users since QuickBASIC would make assumptions about the state of the serial port. It was notable mainly for being the first program I named as a pun for a UNIX system; I called it “gotty” riffing on “getty,” the utility that assigns TTY interfaces when you connect to a port on a UNIX machine.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images