dark mode light mode Search Menu
Search

BBC Basic

Medialab Prado on Flickr

We’ve talked about old languages. We’ve talked about new languages. I don’t think we’ve ever talked about an old language experiencing a revival because of a social media bot before, though, but that’s exactly what we’re going to cover as this issue’s featured language: BBC Basic.

BBC Basic is originally the programming language of a now 40 year old computer called the BBC Microcomputer System, or BBC Micro for short. That is, actually, the same BBC that runs the British television stations and radio. As another aside, if you’re wondering why old desktop computers were often called microcomputers the answer is pretty simple. Adults in the late 1970s and early 1980s still remembered when a computer was a thing that took up at least the size of a big library bookcase and often was the size of an entire room. By comparison, something that could fit on a desk certainly felt like it was a million times smaller—the literal meaning of “micro”. Even though no one has called them “microcomputers” in a couple of decades now, there’s one place that old name lives on: a tiny company named for making MICROcomputer SOFTware. You probably haven’t heard of them. Forget I said anything.

Now, BBC Basic was a lot closer to modern languages than a lot of the other languages used to program home computers at the time: almost all some kind of variants of the original BASIC from the 1960s. It had proper for and while loops, rather than faking loops with go to—a rather infamous programming construct known for being “considered harmful” by a famous computer scientist. It also had functions, declared variables with let-statements like in JavaScript, and had a robust library for drawing and making music.

The reason why it’s worth talking about here in the year 2021 is that there’s a blossoming scene of people making neat art in BBC Basic thanks to the Twitter account @bbcmicrobot. If you tweet a program at this account, a bot will run the program and then create an animated gif of the output of the program and respond back to you with it. This way people have used small programs to create thousands and thousands of neat little pixel art animations.

A screenshot from the replies of the bbc microbot so you can see the kinds of animations it generates

All you need to do to get started is to navigate to the Owlet editor at https://bbcmic.ro and try entering your code. Here’s a very, very simple first program to get started with.

MODE 2
FOR Dogs%=0 TO 300
GCOL 0,RND(15)
PLOT 69, RND(1280),RND(1024)
NEXT Dogs%

To explain it briefly, we start by setting mode 2 which tells it to use a particular graphics mode that has a whopping sixteen colors, half of which blink!. Then we create a for-loop and run it three hundred times. The loop variable in the loop:

Dogs%

ends with a % sign to tell BBC Basic we only want it to hold whole numbers. The loop itself only needs two commands. The first chooses a color to draw with, randomly picking a number between one and fifteen. The second plots a single pixel at a random x and y position. If we gave PLOT a different value than 69 it would draw different shapes instead.

Once you’ve written some code, you can either run it in the browser or use the share button to ask the BBC Micro Bot to run the code for you and make a gif. The cool thing about what the bot can do is that it can run in a special sped-up mode and generate a gif by simulating the computer running the program for up to three hours!

This was just the barest overview, but I hope it’s enough to get you started making fun art with an old programming language. There’s so many amazing examples made in just the past year and I can’t wait to see what else you all can do.

Learn More

Teach kids to code with BBC basic

https://www.alphr.com/features/389884/teach-kids-to-code-with-bbc-basic/

Write games for BBC Micro

https://www.raspberrypi.org/blog/learn-to-write-games-for-the-bbc-micro-with-eben/

BBC Micro history

https://www.youtube.com/watch?v=4rgEzG7F5d8

Microcomputer History

https://en.wikipedia.org/wiki/Microcomputer

BBC Micro Games Archive

http://www.computinghistory.org.uk/archive/Games/platform-BBC%20Micro/

go to statement

http://www.david.tribble.com/text/goto.html

The BBC Basic entry at Rosetta Code

http://rosettacode.org/wiki/Category:BBC_BASIC

The BBC Basic editor

https://bbcmic.ro

BBC micro bot website

https://www.bbcmicrobot.com

BBC Basic tutorial

https://www.bbcmicrobot.com/learn/index.html