The BASIC programming language turns 60

jdale

Ars Legatus Legionis
18,266
Subscriptor
Though not nearly as popular; VB.NET is as functional a development language as C# (indeed, both compile to the same intermediate code and there are only a handful of functional differences, such as VB's support of shadowed classes), and easier for a new person (who lacks experience in a C-style language) to read. I do know of some places that use it for professional development.
I started in BASIC on the TRS-80, Apple II, Commodore 64, and that carried me forward through QBASIC and into VB.Net which I still use. It's a good language and for an occasional programmer I still think it's a much better choice than any variation on C (which I learned in college). If nothing else, it's a lot easier to Google a VB keyword than the corresponding combination of punctuation marks in C.
 
Upvote
1 (1 / 0)

fitten

Ars Legatus Legionis
54,717
Subscriptor++
I had the Applesoft Tutorial book. I actually first learned BASIC programming on the MC-10. Like many others, my first "real" program was a D&D character generator (rolled up stats, etc.). I had the 16KB RAM expansion model for my MC-10 and I eventually made my D&D helper program so large and feature filled that I ran out of RAM programming it. Then I got an Apple ][+ and that was pretty cool. I later got an Apple //c. We had a BASIC programming class in my high school that I took. Several friends and I were already far more advanced than the class and the teacher who taught the class knew us all so he asked us to do the work but also if we would be class helpers... help anyone else who asked, which we, of course, agreed to do. It was during my Apple 8-bit days that I also taught myself assembly (still have the book). I wrote my first 'real' assembly routine to help with some animation for my programming class assignment. The BASIC version was very slow to draw this thing I wanted to be really fast so since I had been learning assembly, I wrote the draw routine in assembly. It was amazingly fast compared to BASIC (literally drawing what I wanted on the screen in less than a second compared to BASIC taking like 15+ seconds). So anyway, yeah... I was one of those kids who knew what I was going to major in at college years before I graduated high school ;)

My favorite BASIC was GFA Basic on the Atari ST, though... it was a structured language with no line numbers, actually had legit functions, etc. Of course, by the time I was messing with that, I had already taught myself C and we were using Pascal for classes.
 
Upvote
6 (6 / 0)

uncle tupelov

Smack-Fu Master, in training
56
I still have the Apple IIGS that my family had in the late 80s. All of the disks that I've loaded up so far still work. I even found the low-res drawing program (in BASIC) that a school tutor helped me write in 3rd grade - I had no idea what he was telling me to type in, but it was fun to see the program evolve.

My kids love playing Zany Golf, Arkanoid, and Battle Chess on the old machine. Not sure if they'll be interested in the "Touch of Applesoft Basic" book, but I'll try it at some point.
 
Upvote
2 (2 / 0)

malor

Ars Legatus Legionis
16,093
For that, BASIC still beats anything out there today, including even Python.
I was confused about OOP for years, until I saw the generated assembly code from an OOP language, possibly C++.

Basically, a class is code. An object is a block of RAM allocated to work with that code. When you create a new object, you're just allocating a precisely-sized RAM block. When you call an object's methods, you're passing a pointer to that block to the existing class code. That means the same code can run on dozens or hundreds of objects, even simultaneously, because each instance is working from a pointer to a unique block of RAM. Each individual variable in an object is just the base pointer plus a predefined offset. The code exists in RAM only once, but it can be used over and over. Each time the code reads or writes a given object's variables, it computes pointer + offset, and works with those specific bytes in RAM.

That's it. That's all OOP really is. There are additional complexities (like descendant objects, which have bigger chunks of RAM because they add in more storage for new variables after the existing ones), but that's the heart of it. And it wasn't until I saw the disassembled machine code that the little light went on for me.

You can ignore most of that in Python if you just want to write something simple. I'd call it straight up superior to BASIC in every way; you can cover the same use cases with about the same amount of complexity in text mode, but then you can easily expand into vastly more complex routines with surprisingly little effort. Python has a lot of very pleasant shortcuts that BASIC doesn't.

edit: doing simple graphics with Python requires much more work. BASIC integrated graphics pretty well, although usually in a unique way on every computer. Using graphics from Python will generally take more effort, but will probably then run anywhere that Python does, instead of being limited to a specific computer model.
 
Last edited:
Upvote
8 (10 / -2)

DJ Farkus

Ars Scholae Palatinae
858
Try the BASIC "two-line" challenge
I recall this was a back-page monthly contest in one of the Apple programming magazines at the time. See what kind of useful or interesting thing you could do in only TWO lines of Apple Basic (256-char limit per line at the time).
You could write compound statements with semicolons, and could GOTO 1 or 2 from within those compound statements. But ultimately, you had 2 branch points: Line 1 and Line 2.
My coding buddy at the time won the contest one month with Tic-Tac-Toe written in two lines of Apple Basic (still a pretty cool accomplishment, IMO)
 
Upvote
7 (7 / 0)

fitten

Ars Legatus Legionis
54,717
Subscriptor++
I was confused about OOP for years, until I saw the generated assembly code
If you learn assembly, you have learned the Deep Magic and there will be no more secrets ;) C++ used to be a preprocessor for C so you could see how it was done, there. Later, I worked on a fair sized code base that used OOP techniques in C. Basically, the code explicitly did a lot of what C++ did for you under the covers. That was an interesting project.
 
Upvote
14 (14 / 0)

Got Nate?

Ars Scholae Palatinae
1,377
In the year 1988, little 7 year old Nate brought home a library book filled with BASIC programs. Nate was so excited when not only did he succeed in making the border of the screen light up as was outlined in the code, but every pixel had a different color as Nate desired. Nate has never stopped programming and eventually made it his dayjob when he grew up.
 
Upvote
8 (8 / 0)

kj7bcf

Seniorius Lurkius
30
Subscriptor++
In 1976, Steve Wozniak developed a BASIC interpreter from scratch for the Apple I using self-taught methods and minimal resources. This became Integer BASIC for the Apple II a year later, and BASIC (as Applesoft BASIC) remained a key part of the Apple II throughout the platform's lifespan.

Woz is such a Hero and Genius! An Absolute National Treasure. It’s been over 4 decades already and I still remember and cherish memories with my Dad and the Apple II. Integer Basic, AppleSoft, call-151, hr, hgr, beagle bros’ small code snippets, autoproofreader, and so much more!

Woz, if by any chance you read this, sir, I salute and celebrate you!
 
Upvote
16 (16 / 0)

Klinn

Ars Scholae Palatinae
1,330
Subscriptor++
it was the first computer language I learned. In High School on an Apple //e
get off my lawn!
Bah, you youngsters don't know how lucky you were. :)

My first language was Fortran during the 1st year of university but they quickly switched to Basic the next year. Then when I could afford to buy my own Apple there was a choice of two models. IIRC, the Apple ][ came with the original Integer Basic while the Apple ][+ came with Applesoft Basic. Hmmm, better execution speed vs. the flexibility of floating point. Decisions, decisions.
 
Upvote
1 (1 / 0)

RetroAtari

Seniorius Lurkius
1
Subscriptor
The word I think best describes BASIC, and the first-generation home computers that used it, is "enabling." People who weren't computer scientists, engineers, or mathematicians could write really cool software with little or no formal training. I still have the BASIC cartridge for my Atari 400, and my 800XL system has it built in. The Apple ][, Commodore 64, Radio Shack TRS-80, TI 99/4A, Atari 8-bit, and similar machines spawned an interest in computing as a career for many people, and BASIC was a huge part of that. And if you wanted to get more advanced, you learned 6502 or Z80 assembly language. Fun times!
 
Upvote
9 (9 / 0)
I learned BASIC in 1975 on a PDP-11/45 running BASIC+ on RSTS/E, followed immediately by using FORTRAN on an IBM 7094 (with core in oil!). The following year I learned 8080 assembly code, then PDP-11 assembly code, and then 6800, PACE, SC/MP, and F8 assembly codes.

I don't think I've used BASIC since 1976, when I started using UNIX. UNIX supposedly had a BASIC interpreter, but it was a joke. Rumor had it that there was a sixpack of beer bet between Thompson and Ritchie over whether he (Ritchie) could write a BASIC interpreter over a weekend. Ritchie won, but the result was even worse than one might have guessed; I've never known anyone to have used it.
 
Upvote
6 (6 / 0)

AusPeter

Ars Praefectus
5,087
Subscriptor
I see lots of references to TI99s etc in terms of home computers. But back in 1986 I had a lot of fun in a professional setting. I was working with a Bailey Network 90 distributed control system used to monitor the annealing of coils of cold rolled steel by reading the temperatures of 2 thermocouples. The coils were stacked up and basically placed inside a huge mobile gas furnace. By tracking those thermocouples and running them through a small mathematical model you could predict when the annealing for all the coils had reached suitable minimum limits.

The operator control stations (OCS) for the system had a TI99 card built into them that allowed you to run TI Basic programs. So I adapted the model to run in TI basic on the internal TI99 card. But the OCS also had to respond to other requests from the actual operators - so I built a what was effectively a polled multi tasking system that ran in a big loop looking for operator key presses, while all the time maintaining the real time calculations for the annealing process (note that I wasn't controlling the furnaces, just monitoring the process). And to top it off, I needed to read/write data from the 8" floppy disks built into the OCS. This required accessing raw disk sectors and overlaying them onto arrays in memory so that the data could be accessed. Fun times. A few years later I worked with Bailey Infi 90 systems that had distributed controllers that actually ran genuine GW-Basic. That made life so much easier!

Fun fact about the annealing system. The vendor that quoted the system screwed up royally in their estimations, and the equipment they contracted to supply could not meet the operational requirements. Rather than pull out, they supplied about $100k of hardware for free so they could brag advertise that "big name steel company" used their equipment.
 
Upvote
6 (6 / 0)

Klinn

Ars Scholae Palatinae
1,330
Subscriptor++
The age of basic was a great time to learn development.

I used to get magazines (Nibble) from my library which would go over a number of programs in detail with the basic source (and sometimes machine language).
I sold several graphics utilities to Nibble magazine, mostly tools to help you create and use Shape Tables for graphics. Also sold them a racing game called Formula Nibble which was mostly 6502 assembler for speed but used Basic as the front end.

ForumlaNibble01Large.jpg


Certainly looks primitive, huh? But at that time, state of the art was white roadside posts moving past you as you drove. I had color! Four of them!! :)

Nibble sold disks containing an issue's programs which was a popular alternative to typing in pages and pages of 6502 assembler and then trying to find all the typos you made.
 
Upvote
14 (14 / 0)

brionl

Ars Tribunus Angusticlavius
9,173
In my case, I first used BASIC on a dial-up mainframe (teletype, 110 baud phone line, files stored on paper tape; at the end of each line, you had to remember RETURN, LINE FEED, RUBOUT, RUBOUT, RUBOUT, because if you didn't include the three RUBOUTs, the print head might not get back to the start position in time). Data entry was... complex.

My first college programming class way back in nineteen ought seventy eight we alternated between IBM assembly language (I forget which model) on punch cards and BASIC on a teletype.
It was pretty fancy for a community college I guess. We had a card punch/reader in the lab we could use, and dedicated lines for the terminals, not dial-up.

Then in '80 I bought an AIM-65 with the massive 4K RAM, 8K Basic ROM and 8K Assembler/Monitor ROM. No video output, and 20 character LED display and/or a 20 char thermal printer. I had to solder up a circuit board to an audio cable for a cassette drive, but it did have cassette read/write sub routines built into the monitor.
 
Upvote
0 (0 / 0)

jbarr

Seniorius Lurkius
4
My first coding experience was BASIC on a VIC-20 with cassette tape store. Memories...

Me too! That got me interested in programming in High School where I programmed on a DEC PDP-11 mini computer, on a PRIME computer in college, and my first job out of college was programming VAX BASIC. After 35+ years in IT, I'm now back to programming in RPG and I'm having a blast! And it all started with a VIC-20 and BASIC.
 
Upvote
1 (1 / 0)
Had a C64 as a kid and spent many an hour typing in code from Compute! and other mags. IIRC, for some programs, they would print code for Applesoft BASIC, C64, TI, and Atari BASIC, so you could compare how each version worked. That's when I noticed C64 BASIC was really lacking commands for dealing with sound and graphics, relying on PEEK and POKE for much of it, whereas Apple and Atari had commands for color, plot etc. A cartridge was eventually released for the C64 called Simons' Basic, which added a lot of the same feature set to C64 BASIC. Loved it!
 
Upvote
6 (6 / 0)

malor

Ars Legatus Legionis
16,093
If you learn assembly, you have learned the Deep Magic and there will be no more secrets
I've never even written x86 assembly, mostly just 6502, but seeing a dissassembled OOP program finally clued me in on how that all actually worked. Before then, I'd found the OOP terminology to be self-referential, chasing itself around in loops that didn't make any damn sense. But even in a mostly-foreign assembly, it made sense after just a few minutes of study. Classes are code, objects are RAM. (well, really, pointers to RAM.)

Doh.
 
Upvote
4 (4 / 0)

JohnnySocko

Ars Praetorian
429
Subscriptor
But did anyone have the BASIC Programming cartridge for the Atari 2600?

As a kid I thought it was cool to have... but not being able to save your work immediately put a damper on putting any effort into using it.
Yes! I was trying to remember which system my friend was using to mess around in BASIC in 6th grade, because I didn't remember him having a computer at that time. And then your comment brought it all back to me -- he was using his Atari 2600. He had a surprising amount of patience, as he would spend hours writing some relatively long programs, knowing the whole time that they would disappear when he turned off the console.

For my part, we had a TI-99/4A at home that was mainly used for games. I dabbled a tiny bit in BASIC, but I did not have the patience for programming. By high school I was taking the Applications Training track rather than the CompSci/programming track. (And I count myself lucky that my high school in the mid-1980s had such a robust IT department.)
 
Upvote
1 (1 / 0)

TychoBrahe

Smack-Fu Master, in training
90
I remember buying a book on BASIC from Radio Shack around 1979 or 80. Mom would go shopping at Walmart and I'd sit outside on a bench reading that thing. I was either in junior high or maybe a freshman. It seems impossible to me now that I could learn it that way. Or that I had the patience for it. It wasn't until my junior year that I got my first computer (Atari 400 with the BASIC cartridge) and my senior year when we got the first computer lab at school. Was fantastic to put it into practice. Ah, found it - https://archive.org/details/Computer_Programming_in_BASIC_for_Everyone_1973_Houghton_Miflin
 
Upvote
3 (3 / 0)
The most influential thing I ever read was from the Applesoft Tutorial:

There is nothing you can do by typing at the keyboard that can do any damage to the computer. Unless you type with a hammer. So feel free to experiment. With your fingers.

That advice gave me--and continues to give me--the freedom to play, experiment, and learn in front of a computer.
ha, I've quoted that to so many people over the years! Great advice for sure, although maybe not quite as true today where you might type/click yes on "are you sure you want to install this extension?" or something.
 
Upvote
5 (5 / 0)
We had a BASIC programming class in my high school that I took. Several friends and I were already far more advanced than the class and the teacher who taught the class knew us all so he asked us to do the work but also if we would be class helpers... help anyone else who asked, which we, of course, agreed to do.
heh that was me too, already the school "expert" by grade 6 and regularly being pulled out of class to help out with the computer (yes, the computer - a single Apple // they wheeled around on a cart)

I was less helpful in grade 10 when the teacher clearly resented that I knew far more than him about the new (original) Macs they got, which my dad had already been bringing home for me to play with. I remember we had a Pascal assignment where we were supposed to write code that drew a couple of shapes on the screen. I basically wrote MacDraw. I can still hear the muttering from every time he begrudgingly had to give me top marks.
 
Last edited:
Upvote
5 (5 / 0)

Wheels Of Confusion

Ars Legatus Legionis
75,421
Subscriptor
Ah memories of jr. high computer programming.

was the first computer language I learned. In High School on an Apple //e

get off my lawn!

Applesoft BASIC on a II+ was my first programming language. My first actually useful program was written there.
Same. BASIC on the venerable IIe in middle school (we were bussed to the "extension campus" for such advanced material). Also got to use Parallax BASIC in my high school electronics class to program Stamp-based microcontroller.

There's a boot-to-BASIC environment for the Pi Pico, in fact you can turn the board into the equivalent of an entire retro computer (with modern storage and peripherals): https://geoffg.net/picomite.html
 
Upvote
1 (1 / 0)

Collyde

Wise, Aged Ars Veteran
137
Subscriptor
In college, I started with FORTAN on punch cards only nerds would love. Getting an Atari changed my life.
I really liked BASIC to start with. On the Atari, its bytecode compiler saved space, added performance, and provided line entry syntax checking that made learning easy. For games, people added assmebly routines that would be stored in strings! So I started learning assembly, which was a great way to really understand how computers work. The next language was Action, which was C-like and delivered in a bank-switched cartridge with an integrated editor, compiler, and runtime. From there I went to C and bigger computers.

But it is hard to duplicate the deep rush of the initial learning stages.
 
Upvote
4 (4 / 0)

fitten

Ars Legatus Legionis
54,717
Subscriptor++
I've never even written x86 assembly
I have touched it only a little (a very tiny little... just a smidgen of 8088/8086 and 80386)... and I certainly don't claim to know any of it at all professionally. The first one I learned was 6502/65C02. After that, 680x0 family, several in the 68xx family, and then several load/store architecture processors (PowerPC, SPARC, MIPS, and another one or two), and a handful of embedded/DSP/weird ones that probably most here have never heard of. I didn't do a lot of direct programming in assembly for some of those rather looking at output from compilers and analyzing what was going on, particularly later on, but for some projects, we had to use C/assembly because of performance reasons (particularly in the embedded/DSP/weird category).
 
Upvote
0 (1 / -1)

fitten

Ars Legatus Legionis
54,717
Subscriptor++
But it is hard to duplicate the deep rush of the initial learning stages.
Yeah... nostalgia and all... way back then (early 80s for me)... the 8-bit computers (C64, Atari 8-bit, Apple II were the ones I had access to through friends or whatever) where mindblowingly amazing. I subscribed to Compute! and A+ early on and when they were delivered, I would absolutely devour the magazines... reading them several times over the next month just to read about stuff so amazing. I still love computers but nothing will ever compare to being a kid and all that discovery.
 
Upvote
6 (6 / 0)

unparadox

Seniorius Lurkius
36
Subscriptor++
Texas Instruments TI-99/4A here with cassette drive connected to a 13" black and white tv.

edit: corrected model number format.
This was my gateway into programming too. Obviously the thing started in basic, but it wasn’t until one time I power cycled and that start screen crashed and dumped to a monitor that I realize that you could make actual software and that it wasn’t just a way to load disks. Seems obvious, but the idea I could write anything and programming wasn’t magical was completely revolutionary to me.
 
Upvote
2 (2 / 0)

DerekRoss

Smack-Fu Master, in training
1
BASIC was originally designed as a compiled language. And in its "most traditional form" at Dartmouth College it was always implemented as a compiler, right from the first version that you describe in this article.

It was only in later non-Dartmouth implementations, particularly those on microcomputers, that it was implemented as an interpreter.
 
Upvote
4 (4 / 0)

benwaggoner

Ars Praefectus
4,102
Subscriptor
So much BASIC nostalgia! I first programmed on an Apple ][ (pre-e) using BASIC when I was nine, circa 1979. I got an Apple //c for high school and wrote a lot of code on it. RoleMaster combat tracking and calculations. Simulations of statistical concepts. I was particularly proud of the "Drunken Walk" simulator where I used two adjoining characters to make a symbol of a guy running around bouncing off the walls. I used a shameful number of GOTO statements that ought have been GOSUB.

But I still haven't seen any nostagia for having to use fracking line numbers (shudder). The first time I touched Pascal I was so amazed to realize that we just didn't need them. They were just a silly leftover from when we computed with punch cards and teletype machines instead of having a screen. Mind. Blown.
 
Upvote
7 (7 / 0)