BBC Micro Bot
Welcome to 8-bit cloudSend a tweet to @bbcmicrobot and it will run it on a 1980s 8-bit computer emulation!Try it now with the text below: 10 MODE 2 20 COLOUR RND(7) 30 PRINT "HELLO WORLD" 40 GOTO 20The bot should reply with a video. Congratulations! You've just written a program in BBC BASIC. This bot runs a full emulation of the BBC Micro Model B - a computer standard in schools in the UK during the 1980s. There is a lot more you can do with it! |
— BBC Micro 🦉 bot (@bbcmicrobot) February 14, 2020 |
BBC BASIC
The BBC Micro Model B emulator used by the bot is running BBC BASIC II (1982). If you've never tried BBC BASIC checking out the examples on the @bbcmicrobot Twitter account is a good place to start.
For more information on BBC BASIC check out:
- 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
— BBC Micro 🦉 bot (@bbcmicrobot) February 10, 2020
Minification of code
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.
You can create some cool animations and graphics using these techniques but the code will become harder to read. Below you can see an example of minifified BBC BASIC. Click the thread to see the resulting image!
@bbcmicrobot
— Electron Greg (@electron_greg) February 13, 2020
0w=64:q=112:u=255:t=23:p=31:MO.5:V.19,3,0,0,0,0:V.t,u,33,18,63,109,u,191,161,18:V.p,0,31,u:V.t,u,0,0,0,128,192,w,w,0:V.p,1,31,u:V.t,u,15,q,15,q,15,q,15,q:V.5:F.M=1TO2:GC.0,M:F.X%=0TO80S.4:F.Y%=0TO32
1IFPO.X%,Y%)>0MOV.(X%*14)+w,(Y%*32)+X%+M*2:V.p,0,0,u
2N.:N.:N.
3GO.3
More details
The bot generates a 3 second, 50fps mp4 after 30 seconds of emulated execution time. If you're curious you might have noticed the Acornsoft Graphics Extension ROM is now installed on the emulated machine. 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. I apologize in advance if I am not able to respond, fix things, or implement new features promptly :)That's all for now. Thanks for the amazing contributions and to all those trying out BBC BASIC again or for the first time.
If you are of a... certain age you must view every tweet by @bbcmicrobot
— ben goldacre (@bengoldacre) February 12, 2020
It runs any code you throw at it.
10 MODE2
20 COLOUR RND(8):PRINT "BEN IS COOL!!!";
30 GOTO 20
RUN