Archive for February 2013

The Story of BASIC   Leave a comment



The Oric version of “30 Hour BASIC”, one of many versions for different computers

First of all, I’d like to start this article by pointing out that various people enjoyed using the Commodore 64 to play games on and nothing else. In other words, they were using it solely as a games console. The problem is that it was marketed as a computer with similar capabilities to other computers of the time. This description is wrong! There were various complaints about Commodore BASIC V2 and I personally remember reading claims such as only about 50,000 Commodore 64 owners understanding how to program the Commodore 64 using its on board BASIC V2, as well as a very critical letter by a Commodore 64 owner to Commodore or ICPUG (Independent Commodore Products User Group) putting down Commodore BASIC V2 and praising BBC BASIC. This was mentioned in the Editorial of the magazine Commodore Horizons No. 7, July 1984. I remember reading this magazine, as well as Your64 when I owned a Commodore 64. You can find copies of these magazines on some archive sites, possibly such as   and, but no longer on the closed down “Commodore is awesome” website , where you have to select from a menu including some Amiga magazines.

BASIC is a programming language invented by Professors Kemeny and Kurtz in 1964, not by Microsoft in 1975! It was originally called Dartmouth BASIC, named after Dartmouth College, New Hampshire, USA, where these two Professors worked. A popular story is that it’s an abbreviation for Beginners’ All purpose Symbolic Instruction Code, but another story is that it’s not an abbreviation, just an easy, or basic programming language. It’s descended from the language FORTRAN, which is short for FORmula TRANslation. It has also been influenced by the language ALGOL, short for ALGOrithmic Language. Microsoft Visual BASIC has moved so far away from the original BASIC that IMHO it’s not BASIC at all.

In the early days of computing (i.e. the 1940s to 1950s, although computers existed long before that), computers were programmed in unbelievably complicated ways, such as by making connections with cables at the back of a computer. This was somehow a program. After that, things moved on to Machine Code and Assembly Language. FORTRAN, then later on BASIC, were seen as big leaps forward at the time.

The original Dartmouth BASIC had only about 40 commands, as listed on , compared to the Commodore 64 BASIC’s 71 commands. We’re talking about 1964, though, not 1982, so that makes a big difference! If by some chance, a Commodore 64 had fallen through a time warp back to 1964, Professors Kemeny and Kurtz would have thought it was absolutely amazing!

Back in those days, computers had no displays, so no graphics or colour either. Later on (1967-1969), a language called LOGO (from “logos” meaning “word” in Greek) was developed by Seymour Papert as a kind of protest against his son being taught FORTRAN at school. This was often or mainly concerned with producing graphics, so that people could get into computing by having fun making pictures at the same time. This usually involved a computer controlling a robot called a turtle, which drew with pens onto large sheets of paper it was moving around on. This was the only way to do graphics with primitive computers, apart from ASCII art. LOGO was descended from the language LISP (LISt Processing language), unlike BASIC and C descended from FORTRAN, and could also be used for Artificial Intelligence (AI), as well as a lot of other applications. With LOGO the emphasis is on English or human language type words instead of mathematical formulae. There’s also a lot of use of the concept recursion, meaning going back on itself, as in procedures calling themselves from within a procedure.

After about 1975, BASIC got more popular on the newly emerging microcomputers. It turns out this was because it required very little RAM, while LOGO required more. Even so, LOGO could run in possibly 16K or 48K RAM, as on the Texas Instruments TI99/4 (predecessor to the TI99/4A) and the Apple II. It wasn’t long before computers with these amounts of RAM came onto the market, but by that time, manufacturers had got into the habit of supplying BASIC with their computers. BASIC diverged into various dialects, when or even before Microsoft based their own BASIC on DEC BASIC, while Atari BASIC (1979), Sinclair BASIC (1980), and possibly a few others, were influenced by Data General BASIC. Some big differences between these two schools of thought were in string handling. Neither Atari BASIC nor Sinclair BASIC used LEFT$, MID$, or RIGHT$ and both of these dialects could dimension a string of up to about 32K long, although Microsoft BASICs couldn’t have strings of anywhere near that length. The main differences between BASIC dialects apart from this were the commands for colour, graphics, and sound. Atari later commissioned a version of Microsoft BASIC on cartridge, but it wasn’t possible to run programs written in Atari Microsoft BASIC without the user having this cartridge plugged in. I heard that the Simon’s BASIC cartridge (which cost £50) was also pirated onto cassette, but that’s obviously another matter. Most Commodore 64 owners expected someone else to write programs they could enjoy on their chosen computer, although it came without a decent BASIC interpreter. They probably didn’t even bother to learn programming, so never found this out.

After the 2600 games console, Atari decided to design and release a range of what were then starting to be called “home computers”, but took some time and care about what type of BASIC they would use. They commissioned a company called Shepardson Microsystems to create a BASIC with custom commands for their Atari 400 and 800 computers, after it turned out that Microsoft’s 8K BASIC wouldn’t fit onto their 8K ROM, so they created a quite different BASIC, with different string handling, as well as the essential custom commands for the Atari colour, graphics, and sound. These commands included GRAPHICS, PLOT, DRAWTO, COLOR, and SETCOLOR, which have no equivalents in Commodore BASIC V2, as on the Commodore 64, even though it was released about 3 years later. Atari BASIC also has error checking, which immediately points out errors after lines have been entered.

Sinclair commissioned quite a reasonable BASIC, by Nine Tiles Software, for the Sinclair ZX80 and ZX81 computers, including the graphics commands PLOT and UNPLOT, which they wanted to conform partly to an ANSI standard, but without paying any fees to Microsoft, so they could keep the price of their computers down. They managed to cram this into just 4K for the ZX80 and 8K for the ZX81! After this, Sinclair, unlike Jack Tramiel’s Commodore, weren’t prepared to use the same BASIC for their ZX Spectrum computer. Instead of this, they got Nine Tiles Software to greatly enhance Sinclair BASIC, allowing a 16K ROM, adding various commands, including commands to handle colour, which the monochrome ZX80 and ZX81 obviously didn’t have. This BASIC had about 86 commands. Even so, Timex wasn’t happy with the original versions of Sinclair BASIC, so they added a few commands for their versions of this computer for the US market. Sinclair Spectrum BASIC listings could often be converted to Sinclair ZX81 BASIC, by making a few changes, such as removing references to colour, and putting each command on a separate program line. Unfortunately, ZX81 BASIC didn’t use READ and DATA, so I don’t know how it got round that, but I’ve heard something about using variables instead.

Tandy/Radio Shack supplied at least THREE versions or levels of BASIC for their Tandy Color Computer or “Coco”, each more powerful than the previous one. I think that the Dragon computer used the same BASIC as the Tandy Level 3 BASIC and there was a 1982 Microsoft Copyright notice, indicating that no expense had been spared. Don’t forget that Commodore hadn’t paid Microsoft any money for BASIC since about 1977!

Acorn Computers had already produced Atom BASIC for their computer of the same name, which included commands such as PLOT (in one of 16 different ways), DRAW, and DO… UNTIL, as well as a built in 6502 Assembler, but were required by the BBC to produce the even more extensive BBC BASIC for the BBC Micro. It included long variable names, procedures as an alternative to subroutines, and the structured programming REPEAT… UNTIL (replacing DO… UNTIL) command for creating conditional loops. It seems to me that Acorn was influenced by Atari in creating 8 display modes for the BBC Micro, as well as abbreviating commands to the first letter, followed by a full stop, while Commodore 64 BASIC abbreviations consisted of the first one or two letters, followed by the graphics character found on the same key as the following letter of the command. BBC BASIC didn’t even have the dreaded POKE or PEEK commands which peppered Commodore 64 BASIC listings, but wherever it was necessary to insert or read a number from a memory location, this was done using a ? , called an “indirection operator”, while the question mark symbol was often short for the command PRINT in other BASIC dialects, but the short form of this was P. in BBC BASIC.

The BBC ran a big computer literacy campaign, a lot of which was based round the BBC Micro. This campaign actually started before the BBC Micro was released, but wasn’t limited to using the BBC Micro. I think that BBC BASIC was so superior to other BASIC dialects of the time that there should have been lots of publicity about this, as well as a government subsidy on all BBC Micros sold and even tax relief to everyone buying one. I’m pretty sure that Mrs Thatcher would have been dead against this, though. Someone else who may have objected would’ve been Clive Sinclair, who had already released another advanced BASIC dialect called SuperBASIC on his Sinclair QL computer. The computer literacy campaign may have started with the publication of the book “30 Hour BASIC”, by the BBC and NEC (National Extension College). This book, which I thought was really important to have a version of for whatever computer you got, turned out to be not very advanced at all. Unfortunately, the BBC/NEC wanted to conform to the lowest common denominator in computing. At the time of writing, this was the Commodore PET, as mentioned in the book. The BASIC listings in this book are described as “a subset of Microsoft BASIC”. The whole impression I get from this book is of a computer as a glorified pocket calculator. With a pocket calculator all you could do was key in and do calculations on sets of figures, then get a result from the figures you’d keyed in. The general tone of this book is basically that’s still all you do, although you can have text prompts about what kind of figures to input, as well as some more text labelling what the answer actually represents. I feel this is influenced by the fact that Commodore had been making calculators, then decided to start making computers. Sinclair had also made calculators, but obviously their BASIC was far superior to Commodore BASIC V2.

Of course, I couldn’t avoid being sucked in to the BBC computer literacy campaign, being sat in front of a BBC Micro, then instructed to type in short BASIC listings in BBC BASIC, which produced amazing graphics in just a few short program lines. I felt back then that I couldn’t wait to learn how to do this on the Commodore 64, but soon found out that this would require a very, very long list of PEEKs and POKEs. One of my favourite BASIC dialects is BBC BASIC, although Atari 8 bit computers have more colours and more RAM than the BBC Micro, so are better in those respects. Of course, the BBC Micro has higher resolution graphics (up to 640×256 with 2 colours), which I think were used to good effect in the classic game Elite. I don’t believe that things have moved on with Microsoft Visual BASIC, because I don’t think this is really BASIC at all, so I think that BBC BASIC is still one of the best, if not THE best BASIC dialect, ever written!

Microsoft liked to produce similar dialects of BASIC for different computers, including GW BASIC for PCs, MSX BASIC for MSX computers (in partnership with ASCII Microsoft of Japan and containing about 150-160 commands), then later on Microsoft BASIC for the original Apple MacIntosh, including support for its system of windows icons mouse and pull down menus (then called a WIMP system), which was ported to become AmigaBASIC for the Amiga computer. MSX BASIC, as well as Amstrad’s Locomotive BASIC (with about 153 commands or more including keywords or functions) enabled the user to call interrupts to a program just by using BASIC commands, although previously this was only possible using Machine Code.

At the end of the day, I think it’s probably easier to ask a Japanese person who doesn’t speak any other language to draw a line across a sheet of paper or canvas than it is to tell a Commodore 64 computer to do the same thing in Commo dore BASIC V2! I don’t speak Japanese, but at least I can tell you the following facts about it. 1. It’s made up of a certain number of sounds (64?) 2. It can be written in a limited number of phonetic characters and doesn’t require the Chinese type “Kanji” characters, of which there are about 40,000. 3. Japanese speakers don’t need you to adhere precisely to their syntax or grammar in order to understand what you mean.

According to the now defunct online translation site frengly (try using Google Translate nowadays), the following Japanese text is the translation of “Please draw a line from one corner of the screen to the other”.

お願いします 引き分け ライン から    スクリーン   その他.

A feature on that website, which may not have worked all the time, was to enable the user to see which translated word is equivalent to which word of the original text. As you may notice, there are only three of the more intricate Kanji type characters in this phrase, while the rest are the phonetic hiragana characters, which you can look up on a chart. Apart from this, the text has been divided into 11 words by vertical bars, although I’m not sure if these show up well, or even at all, depending on which browser you’re using. The words appear in the same order as in English, but “a” and “one” don’t appear in the translation. The phonetic hiragana characters can be found on charts, so you can find out the pronunciation, although this isn’t the case with the Kanji characters. Even so, the first word is please, so this is probably “dozo”, leaving only two characters with the pronunciation unknown to me.

お願いします 引き分け ライン から 角 の ザ スクリーン に ザ その他.

(version separated into individual words)

I hope all this goes to show how much various computer manufacturers cared about what type of BASIC they built in to their computers, while Jack Tramiel and Commodore didn’t give a damn about this when designing the Commodore 64! 彼ら 出来る キス  ! , as they might say in Japanese, although I’m not 100% sure it’s correct.

Posted February 8, 2013 by C64hater in Uncategorized