BBC Micro 🦉 bot

Welcome to 8-bit cloud ;)

Send a tweet to @bbcmicrobot and it will reply to you with a video of it running on an 8-bit computer! This bot runs a full emulation of the BBC Micro Model B - a British computer that introduced a whole generation of kids to computing in schools during the 1980s.

Hello World

If you send a tweet to the bot with the code below it will respond with a video of it running:

10 MODE 2
20 COLOUR RND(7)
30 PRINT "HELLO WORLD"
40 GOTO 20
Congratulations! You've just written a program in BBC BASIC.


Background

The @bbcmicrobot gained over 10 million impressions at launch and fans like comedian Dara Ó Briain, science writer Ben Goldacre, and Raspberry Pi founder Eben Upton. The concept is simple - make a retrocomputer accessible over social media. The bot runs any tweet written in BBC BASIC (1982) a programming language developed by Sophie Wilson who later went on to create the ARM architecture.

The Twitter community rose to the challenge with some seriously creative and clever code within 280 character limit. To paraphrase Robert Henke:

“When technology is constrained minimalism in expression is a necessity”


Learn some BBC BASIC

To learn some BBC BASIC check out:

  • Fun with BBC Micro Bot - Paul Malin | blog
  • Learn to write games for the BBC Micro with Eben | blog
  • BBC Micro User Guide html | PDF
  • 8BS.com's huge collection of BBC BASIC books

If you've never tried BBC BASIC you can also check out the examples on the @bbcmicrobot Twitter account!

Note - The bot will only reply if it sees a line number at the beginning of your tweet

Getting serious - code minification

One of the fun and challenging aspects of the bot is you need to squeeze your BASIC code into a tweet - code golf! You might want to use fewer and smaller line numbers, fewer spaces and check out the minimum abbreviations for BBC BASIC keywords to achieve this. Going beyond this you can encode the BASIC keywords as byte tokens directly (as shown by Rheolism below), and even include 6502 machine code in the tweet itself (Ian Holmes published a framework for this based on Eben's tiny base64 decoder). Below are some examples of the amazing things that can be achieved with one tweet of code on a BBC Micro.

Conway's Life

By Raspberry Pi founder Eben Upton

Population Genetics

By Bioengineering professor Ian Holmes

Tetris in a tweet

By the enigmatic Rheolism.

More details

The bot runs on nodejs and integrates Matt Godbolt's awesome JSbeeb BBC Micro emulator. It runs any tweet that mentions it and responds with a 3 second, 50fps mp4 after 30 seconds of emulated execution time. The Acornsoft Graphics Extension ROM is installed on the emulated machine giving it extended graphics commands. The bot also has a pretty strict filter for bad words and blocks offenders immediately - this is because printing rude words in infinite loops looks a lot like spam to Twitter! The bot is holding up pretty well considering.

Compressed tweets

The experimental feature of base2048 encoding gives you ~380 characters of code in your tweet! The scheme gives us an extra 100 characters per tweet but is dependent on Twitter's current count policy not changing. The one downside is the source tweet is unreadable. But you can easily encode or decode it using the editor.

Thanks!

That's all for now. Thanks for the amazing contributions and to all those trying out BBC BASIC again or for the first time.