10 PRINT "HELLO WORLD!" 20 GOTO 10
For many of us old-timers, our first exposure to computer programming was BASIC: the Beginner’s All-purpose Symbolic Instruction Code. According to the Wikipedia entry on BASIC, the language was created in 1964. I may be old, but at least I’m not quite as old as BASIC.
This series will demonstrate some of the things I have been learning that can really speed up Microsoft BASIC (specifically, COLOR BASIC on the Tandy/Radio Shack TRS-80 Color Computer). Some are things many of us knew back then, but others were complete surprises to me. I will be demonstrating these speed up techniques with short benchmarking example programs.
While this article is specifically using Microsoft COLOR BASIC, the techniques may also apply to other variations of Microsoft (and other) BASIC. I would really like to hear from someone else who can do similar benchmark tests on systems like the Commodore 64, Atari 400/800, etc. to see how applicable they are.
We’ll get started in the next installment with a simple quiz.
Until then, here is a bit about my background with BASIC. Feel free to skip this is you’ve already read variations of this in my other articles and blog posts.
My BASIC Background
I started learning BASIC around 1981 thanks to a friend I met in 7th grade English class. He shared a BASIC programming book with me. We would write programs out on paper and visit a local Radio Shack where they let us type them in on their TRS-80 Model III.
Sometimes they even worked.
My father was thinking of getting me a new video game system to replace the old Atari VCS we had. When he looked in to systems like the Mattel Intellivision, he suggested I could get a computer for the same price and that it could play games too.
We both began researching systems, and I decided I wanted a VIC-20. My father, on the other hand, had determined what I really should have is the Commodore. We had independently picked the same system, and that’s how I ended up with my first computer: a Commodore VIC-20. It cost us $299.95, allowing it to live up to it’s claim that it was the first full-featured color computer for “under $300.”
I remember hooking that computer up to a small color TV set in my bedroom. I stayed up all night reading through the instruction manual and typing in example programs. I could now write computer programs using a keyboard instead of pencil and paper. I wondered if the Radio Shack salesmen would miss me.
I learned fast, and soon had my first program, a game called EGGS, published in the VIC-NIC NEWS newsletter. I had to write it out on paper to send it to them since I did not have a printer.
And that is how my BASIC programming life began.
Side Note: Last year, I found my old cigar box of VIC-20 cassettes containing a few programs I typed in and dozens I wrote on my own – mostly games. I was able to load most of them in an emulator and take a look at what I did when I was 12. You can see screen shots on my Sub-Etha Software VIC-20 page.
From CBM BASIC to Microsoft BASIC
I spent about a year with the VIC-20 before moving on to a Radio Shack TRS-80 Color Computer. I made this switch after a salesmen showed me something new they just got in: EXTENDED COLOR BASIC.
I had, of course, seen the Color Computer during visits to Radio Shack, but I had originally ruled it out as a computer to own. It’s primitive block graphics and simple SOUND command were nowhere as nice as what the VIC-20 could do.
EXTENDED BASIC changed everything for me.
Now, simple commands could draw LINEs, CIRCLEs, and PAINT objects on the screen. Although it had fewer colors, the high resolution 256×192 screen was bigger than the VIC’s and you could actually do stuff on it without doing a bunch of POKE commands. Even though the new PLAY music command could only play one note at a time, you could easily play a tune without using a bunch of POKEs and DATA statements.
I gave up more colors and music because EXTENDED BASIC actually let me do things easily that would have taken quite a bit of work on the VIC-20. (And yes, I know about the Super Expander cartridge for the VIC-20. I had it, and used it to do video graphics for my dad for videos that ran at boat expos. But no one could run anything I wrote using it unless they also had that cartridge, so it was very limited.)
Thanks to my Radio Shack salesman friend using his employee discount and upgrading the computer himself, I was able to get a 64K Color Computer for $300 – half the price of the Commodore 64 that would have been my natural choice had it not cost nearly $600 at the time.
I spent about a decade programming in BASIC (and some 6809 assembly) before moving to the OS-9 operating system. Under OS-9, I first learned the amazing Microware BASIC09 before moving on to C. After this, I rarely touched BASIC again until recently rediscovering how fun it can be as a retro hobby.
Although I have forgotten most of what I once knew, the modern internet gives me resources I never had back in 1982. Today everything seems to be available online: magazine scans full of tutorial articles, digitized programming books, and endless discussion groups where folks exchange ideas and answer questions.
Maybe this series can be a useful resource to others wanting to get the most out of BASIC.
Until next time…