For completeness: Level 9 “Snowball” bitmap font

The Snowball font on the Amstrad CPC 464

Oooh blecch — did I really like this when I was a young ‘un? Following on from the same process as in The coolest font (when I was 15, that is) here’s the bitmap font from Level 9’s Snowball.

 10 REM    *** L9SFONT.BAS ***
 15 REM bitmap font from Level 9's
 20 REM Snowball text adventure
 30 REM  on the Amstrad CPC 464
 40 REM (it was so cool at the time…)
 50 REM Dug up by scruss, 2020-01
 60 REM ==============================
 100 SYMBOL AFTER 32
 110 MODE 1
 120 GOSUB 1000
 130 PRINT" *** It's the Level 9 font ***"
 140 PRINT" ***    from  Snowball!    ***"
 150 PRINT"   Dug up by scruss, 2020-01"
 160 PRINT
 170 PEN 2
 180 PRINT"Lorem ipsum dolor sit amet, consectetur"
 190 PRINT"adipiscing elit, sed do eiusmod tempor"
 200 PRINT"incididunt ut labore et dolore magna"
 210 PRINT"aliqua. Ut enim ad minim veniam, quis"
 220 PRINT"nostrud exercitation ullamco laboris"
 230 PRINT"nisi ut aliquip ex ea commodo consequat"
 240 PRINT"arfle barfle gloop? | | |"
 250 PRINT
 260 PEN 1
 270 FOR i%=32 TO 127
 280 PRINT CHR$(i%); " ";
 290 NEXT i%
 300 PRINT
 310 PRINT
 990 END
 1000 SYMBOL 33,&10,&28,&28,&28,&10,0,&38,0
 1010 SYMBOL 34,&66,&66,&44,&88,0,0,0,0
 1020 SYMBOL 35,0,&24,&7e,&24,&24,&7e,&24,0
 1030 SYMBOL 36,&10,&7c,&40,&7c,&04,&7c,&10,0
 1040 SYMBOL 37,&e4,&a4,&e8,&10,&2e,&4a,&4e,0
 1050 SYMBOL 38,&70,&88,&88,&72,&84,&88,&76,0
 1060 SYMBOL 39,&0c,&0c,&08,&10,0,0,0,0
 1070 SYMBOL 40,&0c,&10,&30,&30,&20,&14,&0c,0
 1080 SYMBOL 41,&30,&28,&04,&0c,&0c,&08,&30,0
 1090 SYMBOL 42,&10,&54,&38,&fe,&38,&54,&10,0
 1100 SYMBOL 43,0,&10,&10,&7c,&10,&10,0,0
 1110 SYMBOL 44,0,0,0,0,&18,&18,&10,&20
 1120 SYMBOL 45,0,0,0,&fc,0,0,0,0
 1130 SYMBOL 46,0,0,0,0,&1c,&14,&1c,0
 1140 SYMBOL 47,0,&06,&0e,&08,&10,&70,&60,0
 1150 SYMBOL 48,&fc,&8c,&8c,&84,&c4,&c4,&fc,0
 1160 SYMBOL 49,&30,&10,&10,&10,&18,&18,&38,0
 1170 SYMBOL 50,&f8,&98,&08,&f8,&80,&c8,&f8,0
 1180 SYMBOL 51,&7c,&64,&04,&3c,&34,&04,&7c,0
 1190 SYMBOL 52,&c8,&88,&88,&f8,&08,&18,&18,0
 1200 SYMBOL 53,&f8,&98,&80,&f0,&08,&c8,&f0,0
 1210 SYMBOL 54,&78,&98,&80,&f8,&98,&c8,&f8,0
 1220 SYMBOL 55,&fc,&c4,&04,&08,&08,&18,&18,0
 1230 SYMBOL 56,&fc,&c4,&8c,&fc,&84,&9c,&fc,0
 1240 SYMBOL 57,&fc,&e4,&84,&fc,&04,&0c,&0c,0
 1250 SYMBOL 58,&38,&28,&38,0,&38,&28,&38,0
 1260 SYMBOL 59,&18,&18,0,&18,&18,&10,&20,0
 1270 SYMBOL 60,&04,&08,&10,&20,&10,&08,&04,0
 1280 SYMBOL 61,0,0,&7e,0,&7e,0,0,0
 1290 SYMBOL 62,&80,&40,&20,&10,&20,&40,&80,0
 1300 SYMBOL 63,&7c,&04,&1c,&10,&10,0,&10,0
 1310 SYMBOL 64,&3e,&22,&2e,&2a,&2e,&20,&3e,0
 1320 SYMBOL 65,&fc,&c4,&8c,&fc,&84,&c4,&c4,0
 1330 SYMBOL 66,&f8,&84,&e4,&f8,&84,&9c,&f8,0
 1340 SYMBOL 67,&fc,&8c,&80,&80,&c0,&c4,&fc,0
 1350 SYMBOL 68,&f8,&64,&64,&44,&4c,&4c,&f8,0
 1360 SYMBOL 69,&fc,&8c,&c0,&f8,&c0,&8c,&fc,0
 1370 SYMBOL 70,&fc,&9c,&80,&f8,&80,&c0,&c0,0
 1380 SYMBOL 71,&fc,&9c,&80,&9c,&c4,&c4,&fc,0
 1390 SYMBOL 72,&c4,&c4,&84,&fc,&84,&8c,&8c,0
 1400 SYMBOL 73,&7c,&14,&10,&10,&10,&50,&7c,0
 1410 SYMBOL 74,&7c,&54,&10,&18,&18,&90,&60,0
 1420 SYMBOL 75,&c8,&90,&a0,&d0,&88,&8c,&8c,0
 1430 SYMBOL 76,&c0,&c0,&c0,&80,&80,&98,&f8,0
 1440 SYMBOL 77,&82,&ee,&92,&92,&ba,&82,&c6,0
 1450 SYMBOL 78,&8c,&c4,&c4,&b4,&8c,&8c,&84,0
 1460 SYMBOL 79,&fc,&c4,&c4,&84,&8c,&8c,&fc,0
 1470 SYMBOL 80,&fc,&c4,&8c,&fc,&80,&c0,&c0,0
 1480 SYMBOL 81,&fc,&c4,&c4,&84,&94,&88,&f4,0
 1490 SYMBOL 82,&fc,&c4,&8c,&fc,&90,&c8,&cc,0
 1500 SYMBOL 83,&fc,&84,&80,&78,&04,&84,&fc,0
 1510 SYMBOL 84,&7c,&10,&10,&10,&30,&30,&30,0
 1520 SYMBOL 85,&c4,&c4,&84,&8c,&8c,&8c,&fc,0
 1530 SYMBOL 86,&c4,&84,&84,&48,&48,&30,&30,0
 1540 SYMBOL 87,&84,&84,&84,&b4,&b4,&cc,&84,0
 1550 SYMBOL 88,&cc,&cc,&48,&30,&48,&cc,&cc,0
 1560 SYMBOL 89,&86,&86,&44,&28,&10,&18,&18,0
 1570 SYMBOL 90,&fc,&84,&08,&30,&40,&84,&fc,0
 1580 SYMBOL 91,&7c,&60,&60,&40,&40,&4c,&7c,0
 1590 SYMBOL 92,0,&60,&30,&10,&08,&0c,&06,0
 1600 SYMBOL 93,&3e,&32,&02,&02,&06,&06,&3e,0
 1610 SYMBOL 94,&18,&24,&42,&42,0,0,0,0
 1620 SYMBOL 95,0,0,0,0,0,0,&ee,&bb
 1630 SYMBOL 96,&3c,&22,&78,&20,&78,&20,&7e,0
 1640 SYMBOL 97,0,0,&f8,&98,&88,&cc,&fc,0
 1650 SYMBOL 98,&80,&80,&f8,&98,&88,&c8,&f8,0
 1660 SYMBOL 99,0,0,&f8,&88,&c0,&c8,&f8,0
 1670 SYMBOL 100,&08,&08,&f8,&98,&88,&c8,&f8,0
 1680 SYMBOL 101,0,0,&f8,&80,&e0,&80,&f8,0
 1690 SYMBOL 102,0,&1c,&10,&38,&38,&10,&70,0
 1700 SYMBOL 103,0,0,&f8,&98,&88,&f8,&08,&78
 1710 SYMBOL 104,&c0,&c0,&80,&f8,&88,&cc,&cc,0
 1720 SYMBOL 105,0,&60,0,&60,&60,&70,&70,0
 1730 SYMBOL 106,&08,0,&18,&18,&08,&08,&68,&78
 1740 SYMBOL 107,&c0,&c0,&cc,&d8,&f0,&d8,&cc,0
 1750 SYMBOL 108,&30,&30,&30,&30,&30,&30,&30,0
 1760 SYMBOL 109,0,0,&cc,&b4,&b4,&84,&84,0
 1770 SYMBOL 110,0,0,&f8,&98,&88,&cc,&cc,0
 1780 SYMBOL 111,0,0,&f8,&98,&88,&c8,&f8,0
 1790 SYMBOL 112,0,0,&f8,&98,&88,&f8,&80,&80
 1800 SYMBOL 113,0,0,&f8,&88,&c8,&f8,&0c,&0c
 1810 SYMBOL 114,0,0,&f8,&98,&80,&c0,&c0,0
 1820 SYMBOL 115,0,0,&f8,&80,&70,&08,&f8,0
 1830 SYMBOL 116,&60,&60,&20,&78,&20,&28,&38,0
 1840 SYMBOL 117,0,0,&c8,&c8,&98,&98,&f8,0
 1850 SYMBOL 118,0,0,&cc,&cc,&88,&70,&20,0
 1860 SYMBOL 119,0,0,&84,&84,&b4,&b4,&cc,0
 1870 SYMBOL 120,0,0,&cc,&48,&30,&48,&cc,0
 1880 SYMBOL 121,0,0,&88,&c8,&f8,&08,&08,&78
 1890 SYMBOL 122,0,0,&f8,&90,&20,&48,&f8,0
 1900 SYMBOL 123,&0c,&30,&10,&60,&10,&30,&0c,0
 1910 SYMBOL 124,&df,&db,&db,&9f,&83,&9b,&fb,0
 1920 SYMBOL 125,&30,&0c,&08,&06,&08,&0c,&30,0
 1930 SYMBOL 126,&7c,&82,&ba,&a2,&ba,&82,&7c,0
 1940 SYMBOL 127,&FF,&FF,&FF,&FF,&FF,&FF,&FF,&FF
 1950 RETURN

Process was the same:

  1. Load the disk image into an emulator
  2. Load the game
  3. Save the game as a v2 snapshot – these are uncompressed memory dumps
  4. Dump the snapshot to a png using phooky’s PROM/bin2png.py
  5. Crop that image down to just the character data and save as a plain PBM
  6. For each column, create the hex dump using shell code a bit like this:
sc=32; pnminvert snowball_font.pbm | pnmnoraw | tail +3 | cut --character="1-8"|while read f; do echo "printf '&%02x, \n' "\"\$((2#${f}))\"; done | bash | fmt -w43 | sed 's/,$//;' | while read g; do echo SYMBOL $sc", "$g; sc=$((sc + 1)); done | awk '{print 10 * (NR + 0) " " $0;}' > schars032to063.bas

The coolest font (when I was 15, that is)

vaguely uncial style bitmap font from old 8-bit Level 9 text adventure
The Colossal Cave font on the Amstrad CPC 464

Though I didn’t really have the patience for text adventures, Level 9 used what I thought was the coolest font (circa 1985). After checking through them all on the Internet Archive Amstrad CPC software library, I couldn’t find a version that used this bitmap font. I eventually found it on nvg. After lots of messing about, I extracted it and present it here. I’m sure I’ll make a TTF of it soon enough.

Tastes change a bit, don’t they?

 10 REM     *** L9FONT.BAS ***
 15 REM bitmap font from Level 9's
 20 REM Colossal Cave adventure
 30 REM  on the Amstrad CPC 464
 40 REM (it was so cool at the time…)
 50 REM Dug up by scruss, 2019-12
 60 REM ==============================
 100 SYMBOL AFTER 32
 110 MODE 1
 120 GOSUB 1000
 130 PRINT" *** It's the Level 9 font ***"
 140 PRINT" ***  from Colossal Cave!  ***"
 150 PRINT"   Dug up by scruss, 2019-12"
 160 PRINT
 170 PEN 2
 180 PRINT"Lorem ipsum dolor sit amet, consectetur"
 190 PRINT"adipiscing elit, sed do eiusmod tempor"
 200 PRINT"incididunt ut labore et dolore magna"
 210 PRINT"aliqua. Ut enim ad minim veniam, quis"
 220 PRINT"nostrud exercitation ullamco laboris"
 230 PRINT"nisi ut aliquip ex ea commodo consequat"
 240 PRINT"arfle barfle gloop? | | |"
 250 PRINT
 260 PEN 1
 270 FOR i%=32 TO 127
 280 PRINT CHR$(i%); " ";
 290 NEXT i%
 300 PRINT
 310 PRINT
 990 END
 1000 SYMBOL 33,&18,&24,&24,&24,&18,&0,&18,&0
 1010 SYMBOL 34,&66,&66,&44,&88,&0,&0,&0,&0
 1020 SYMBOL 35,&0,&24,&7E,&24,&24,&7E,&24,&0
 1030 SYMBOL 36,&12,&7C,&D0,&7C,&16,&FC,&10,&0
 1040 SYMBOL 37,&E4,&A4,&E8,&10,&2E,&4A,&4E,&0
 1050 SYMBOL 38,&70,&D8,&D8,&72,&D6,&CC,&76,&0
 1060 SYMBOL 39,&30,&30,&20,&40,&0,&0,&0,&0
 1070 SYMBOL 40,&1C,&38,&70,&70,&70,&38,&1C,&0
 1080 SYMBOL 41,&70,&38,&1C,&1C,&1C,&38,&70,&0
 1090 SYMBOL 42,&10,&54,&38,&FE,&38,&54,&10,&0
 1100 SYMBOL 43,&0,&10,&10,&7C,&10,&10,&0,&0
 1110 SYMBOL 44,&0,&0,&0,&0,&30,&30,&20,&40
 1120 SYMBOL 45,&0,&0,&0,&F8,&0,&0,&0,&0
 1130 SYMBOL 46,&0,&0,&0,&0,&0,&60,&60,&0
 1140 SYMBOL 47,&0,&4,&8,&10,&20,&40,&0,&0
 1150 SYMBOL 48,&7C,&C6,&CE,&D6,&E6,&C6,&7C,&0
 1160 SYMBOL 49,&8,&18,&38,&18,&18,&18,&3C,&0
 1170 SYMBOL 50,&3C,&66,&C,&18,&30,&62,&7E,&0
 1180 SYMBOL 51,&7E,&4C,&18,&3C,&6,&66,&3C,&0
 1190 SYMBOL 52,&4,&C,&1C,&2C,&7E,&C,&1E,&0
 1200 SYMBOL 53,&3E,&66,&60,&7C,&6,&6,&7C,&0
 1210 SYMBOL 54,&3C,&66,&60,&7C,&66,&66,&3C,&0
 1220 SYMBOL 55,&7E,&46,&6,&C,&C,&18,&18,&0
 1230 SYMBOL 56,&3C,&66,&34,&18,&2C,&66,&3C,&0
 1240 SYMBOL 57,&3C,&66,&66,&3E,&6,&66,&3C,&0
 1250 SYMBOL 58,&0,&30,&30,&0,&0,&30,&30,&0
 1260 SYMBOL 59,&0,&30,&30,&0,&30,&30,&20,&40
 1270 SYMBOL 60,&1C,&30,&60,&C0,&60,&30,&1C,&0
 1280 SYMBOL 61,&0,&0,&F8,&0,&F8,&0,&0,&0
 1290 SYMBOL 62,&E0,&30,&18,&C,&18,&30,&E0,&0
 1300 SYMBOL 63,&7C,&64,&C,&18,&10,&0,&10,&0
 1310 SYMBOL 64,&7C,&C6,&DE,&D2,&DE,&C0,&7E,&0
 1320 SYMBOL 65,&18,&6C,&C6,&C6,&FE,&66,&F6,&0
 1330 SYMBOL 66,&FC,&C6,&C6,&FC,&C6,&C6,&FC,&0
 1340 SYMBOL 67,&3C,&66,&C0,&C0,&C0,&66,&3C,&0
 1350 SYMBOL 68,&D8,&EC,&C6,&C6,&C6,&EC,&D8,&0
 1360 SYMBOL 69,&FE,&62,&60,&78,&60,&62,&FE,&0
 1370 SYMBOL 70,&FE,&62,&60,&78,&60,&60,&E0,&0
 1380 SYMBOL 71,&3C,&66,&C0,&CE,&C6,&66,&3C,&0
 1390 SYMBOL 72,&C6,&C6,&C6,&FE,&C6,&C6,&C6,&0
 1400 SYMBOL 73,&7E,&18,&18,&18,&18,&18,&7E,&0
 1410 SYMBOL 74,&FE,&8C,&C,&C,&C,&CC,&78,&0
 1420 SYMBOL 75,&E6,&CC,&D8,&F0,&D8,&CC,&C6,&0
 1430 SYMBOL 76,&E0,&C0,&C0,&C0,&C0,&C2,&FE,&0
 1440 SYMBOL 77,&C6,&EE,&FE,&D6,&C6,&C6,&CC,&0
 1450 SYMBOL 78,&CE,&E6,&F6,&DE,&CE,&C6,&C6,&0
 1460 SYMBOL 79,&38,&6C,&C6,&C6,&C6,&6C,&38,&0
 1470 SYMBOL 80,&DC,&E6,&C6,&C6,&FC,&C0,&C0,&0
 1480 SYMBOL 81,&38,&6C,&C6,&C6,&CA,&64,&3A,&0
 1490 SYMBOL 82,&DC,&E6,&C6,&C6,&FC,&CC,&C6,&0
 1500 SYMBOL 83,&7C,&C6,&C0,&7C,&6,&C6,&7C,&0
 1510 SYMBOL 84,&FE,&B2,&30,&30,&30,&30,&30,&0
 1520 SYMBOL 85,&E6,&66,&C6,&C6,&C6,&C6,&7C,&0
 1530 SYMBOL 86,&E6,&66,&C6,&C6,&CC,&78,&30,&0
 1540 SYMBOL 87,&EC,&66,&C6,&C6,&D6,&D6,&6C,&0
 1550 SYMBOL 88,&EE,&C6,&6C,&38,&6C,&C6,&EE,&0
 1560 SYMBOL 89,&EE,&C6,&2C,&18,&18,&18,&18,&0
 1570 SYMBOL 90,&FE,&8C,&18,&30,&60,&C2,&FE,&0
 1580 SYMBOL 91,&7C,&64,&60,&60,&60,&60,&7C,&0
 1590 SYMBOL 92,&0,&60,&30,&10,&8,&C,&6,&0
 1600 SYMBOL 93,&3E,&6,&6,&6,&6,&26,&3E,&0
 1610 SYMBOL 94,&18,&24,&42,&42,&0,&0,&0,&0
 1620 SYMBOL 95,&0,&0,&0,&0,&0,&0,&EE,&BB
 1630 SYMBOL 96,&3C,&22,&78,&20,&78,&20,&7E,&0
 1640 SYMBOL 97,&0,&0,&74,&DC,&C4,&CC,&74,&0
 1650 SYMBOL 98,&C0,&C0,&DC,&E6,&C6,&E6,&DC,&0
 1660 SYMBOL 99,&0,&0,&78,&CC,&C0,&CC,&78,&0
 1670 SYMBOL 100,&0,&70,&18,&7C,&CC,&CC,&78,&0
 1680 SYMBOL 101,&0,&0,&78,&CC,&FC,&C0,&7C,&0
 1690 SYMBOL 102,&68,&74,&60,&F8,&60,&60,&60,&C0
 1700 SYMBOL 103,&0,&0,&78,&CC,&C0,&CC,&7C,&C
 1710 SYMBOL 104,&C0,&C0,&D8,&EC,&CC,&D8,&DC,&0
 1720 SYMBOL 105,&C,&0,&38,&18,&18,&18,&38,&0
 1730 SYMBOL 106,&6,&0,&1C,&C,&C,&C,&4C,&38
 1740 SYMBOL 107,&C0,&C0,&CC,&D8,&F0,&D8,&CE,&0
 1750 SYMBOL 108,&30,&30,&30,&30,&30,&36,&3E,&0
 1760 SYMBOL 109,&0,&0,&AC,&D6,&D6,&C6,&CC,&0
 1770 SYMBOL 110,&0,&0,&BC,&C6,&C6,&CC,&DE,&0
 1780 SYMBOL 111,&0,&0,&7C,&C6,&C6,&C6,&7C,&0
 1790 SYMBOL 112,&0,&0,&DC,&E6,&C6,&E6,&DC,&C0
 1800 SYMBOL 113,&0,&0,&76,&CE,&C6,&CE,&76,&6
 1810 SYMBOL 114,&0,&0,&DC,&E6,&C6,&FC,&C6,&0
 1820 SYMBOL 115,&0,&0,&3C,&60,&3C,&8E,&7C,&0
 1830 SYMBOL 116,&18,&30,&FC,&30,&30,&32,&1C,&0
 1840 SYMBOL 117,&0,&0,&E6,&66,&C6,&C6,&7A,&0
 1850 SYMBOL 118,&0,&0,&EC,&66,&C6,&EC,&38,&0
 1860 SYMBOL 119,&0,&0,&EC,&C6,&D2,&7C,&28,&0
 1870 SYMBOL 120,&0,&0,&EE,&6C,&38,&6C,&EE,&0
 1880 SYMBOL 121,&0,&0,&EC,&C6,&6C,&18,&30,&E0
 1890 SYMBOL 122,&0,&0,&FE,&9C,&30,&62,&FE,&0
 1900 SYMBOL 123,&C,&30,&30,&60,&30,&30,&C,&0
 1910 SYMBOL 124,&CF,&DB,&DB,&CF,&C3,&DB,&FB,&0
 1920 SYMBOL 125,&60,&18,&18,&C,&18,&18,&60,&0
 1930 SYMBOL 126,&7C,&C6,&BA,&A2,&BA,&C6,&7C,&0
 1940 SYMBOL 127,&FF,&FF,&FF,&FF,&FF,&FF,&FF,&FF
 1950 RETURN

Taxman – a BASIC game from 1973

Back in 1973, the future definitely wasn’t equally distributed. While in Scotland we had power cuts, the looming three-day week and Miners’ Strike I, in California, the People’s Computer Company (PCC) was giving distributed computer access, teaching programming and publishing computer magazines. I don’t think we got that kind of access until (coincidentally) Miners’ Strike II a little over 10 years later.

taxman drawn image from People's Computer Company magazine (1973) , with "1 for you 19 for me" quote from The Beatles song "Taxman"
flares? platforms? centre parting? bow tie? It was 1973 after all

But the People’s Computer Company magazine archive is a sunny thing, overfilled with joyful amateur enthusiasm and thousands of lines of code fit to make Edsger Dijkstra explode. Of course it was written for the local few who had access to mainframes and terminals, but it hardly seems to come from the same world as the dark evenings in Scotland spent cursing the smug neighbours’ house with all the lights on, their diesel generator putt-putting into the night.

Lots of these games from the PCC era are forgettable now. The raw challenge of guessing a number on a text screen has paled somewhat in the face of 4K photo-realistic rendering. One game I found is still a little challenging, at least until you work out the trick of it: Taxman (or as the authors tried to rename it later, Factor Monster). Here’s a tiny sample game transcript:

Hi, I'm the taxman
Do you want the regulations?
(1=Yes, 0=No)? 0

How many numbers do you want
in the list? 6

The list is: 1  2  3  4  5  6 

You take? 5
Your total is  5 
I get  1 
My total is  1 

New list:  2  3  4  6 

You take? 6
Your total is  11 
I get  2  3 
My total is  6 

New list:  4 
I get  4 
because no factors of any number
are left.
My total is  10 

You  11  Taxman  10 
You win !!!

Again (1=yes, 0=no)?

Seems I sneaked a lucky win there, but it’s harder than it looks. The rules are simple:

  • Start with a list of consecutive numbers
  • You choose a number, but it has to have some factors in the list
  • The taxman (or the factor monster, a concept I much prefer as it doesn’t reinforce the Helmsley Doctrine) takes all the remaining factors of your number from the list
  • You get to choose a number from the list, which is now missing your previous choice and all of its factors, and repeat
  • Once the list has no multiples of any other number, the taxman/FM takes the rest
  • The winner is whoever has the largest sum.

For such a simple game (or perhaps, such a simple me) the computer wins surprisingly often. Since I find it fun to play, I thought I’d share the 1973 love as much as possible by porting to all of the BASIC dialects that I knew.

Plain text BASICtaxman.bas —runs under interpreters such as bas. Almost verbatim from the 1973 publication. May not allow you to play again on some interpreters; you might want to try my slightly rearranged 40 column version that should run on systems that don’t allow a variable to be dimensioned twice.

taxman on Amstrad CPC: starting with numbers 1-6, player has taken 4, so taxman takes 1 & 2, leaving 3, 5 and 6
taxman on Amstrad CPC: how BASIC programs look to me, yellow on blue 4 lyfe

Amstrad CPC Locomotive BASICtaxman.dsk — or as I call it, BASIC. 40 columns yellow on blue is how BASIC should look.

taxman on BBC Micro, showing games tart for 1-6. Adjacent numbers are a full column apart
taxman on BBC, Mode 7: dig the weird spacing

BBC BASICtaxman.ssd — for all the boopBeep fans out there. You can actually play this one in your browser, too. Yes, the number formatting is weird, but BBC BASIC was always its own master.

taxman: Commodore 64 showing the instructions
taxman on C64

Commodore 64taxman.prg — very very upper case for this dinosaur of a BASIC.

taxman running on Apple II: loaded from disk, started with 6 numbers
taxman running on Apple II

Apple II AppleSoft BASICTAXMAN.DSK — lots of fiddling with import tools and dialect weirdness because Apple.

taxman: end of game on ZX spectrum
taxman: end of game on ZX spectrum

ZX Spectrum (Sinclair BASIC)taxman.tap — 32 columns plus a very special dialect (no END, GOTO and GOSUB are GO TO and GO SUB, …) meant this took a while, but it was quite rewarding to get going.

taxman - BASIC program listing on ZX-81 running under sz81 emulator, Linux window borders visible
Taxman on ZX81: more SCROLLs than the Dead Sea

Sinclair ZX81 (16 K) — taxman.p — this one was a fight. The ZX81 didn’t scroll automatically, so you have to invoke SCROLL before every newline-generating PRINT or else your program will stop. For some reason this version gets unbearably slow near the end of long games, but it does complete.

Lovely automata: bbcbasicbot

bbcbasicbot rendering of my one-liner

BBC BASIC bot [beta2] on Twitter is lovely. You tweet a BBC BASIC program to it and it replies with an animation rendering of what your program would look like on a BBC Micro.

I sent it this:

1MODE4:VDU23,224,24,48,96,193,131,6,12,24:VDU23,225,24,12,6,131,193,96,48,24
2PRINTCHR$(224.5+RND(1));:GOTO2

which readers might recognize as 10 PRINT, the endless random maze one-liner for the C64. This program even inspired its own book – also called 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 – about simple generative art.

You can run it in your browser thanks to the amazing JSBeeb.

eben’s bbc basic programmes

I wrote this as a comment to Learn to write games for the BBC Micro with Eben – Raspberry Pi, but it didn’t seem to save:

BeebEm? Lawks, that’s a bit old (2006). All the cool (*cough*) kids are running b-em – https://github.com/stardot/b-em – these days. It’s lovingly maintain by Stardot forum members. It’s a little crashy on some Linux platforms, but seems stable on the Raspberry Pi and Raspbian. You may need to install the liballegro5-dev and zlib1g-dev packages to get it to compile.

If you want a native version of BBC BASIC, Richard Russell’s version is pretty neat: http://www.bbcbasic.co.uk/bbcsdl/ . You’ll most likely need to change line 280 to use some variant of the WAIT command to make it playable.

Another native interpreter is Brandy. There’s an ancient one in the repos, but I’m completely taken with the Matrix Brandy fork: https://github.com/stardot/MatrixBrandy . It may need a few packages installed to get it to build (libsdl1.2-dev might be a good first try), but it’s really fast. For cross-platform happiness, change line 280 to WAIT 10. If you stick to using a FOR loop, you might have to have it as high as 2,000,000 on a fast computer!

Lastly, if you want to run the game in a browser, JSBeeb to the rescue: https://bbc.godbolt.org/?autorun&loadBasic=https://gist.githubusercontent.com/scruss/f5a8eb83f28b85d6399142cac460c806/raw/74c4e39de7661bb2e3dd7f435840dd8db7172589/helicopter.bbc
It’s a bit slow in Chromium on a Raspberry Pi, but it does work!

Comprehensive Uncle TechTip Simulator

Around 1988–1991 there was a weekly computer magazine in the UK called New Computer Express. This period coincided roughly with the time I was a freelance writer in the same field.

For childish reasons now lost to time, a group of us freelancers had a major hate-on for  NCE’s advice columnist. Writing under the name Uncle TechTip, this columnist seemed to answer most questions with something like “Hmm, I don’t know anything about _____. Maybe a reader can help?” Almost without fail, he’d have readers write in answers for next week’s issue.

Not realizing that Uncle TT’s economy of response was a sly precursor to crowdsourcing websites, the neophyte journo brigade were incensed by his lack of knowledge. One of us wrote an Uncle TechTip Simulator in BASIC, which I recreate from memory for your enjoyment:

10 CLS
15 PRINT " *** Uncle TechTip Simulator ***"
20 PRINT
25 INPUT "What is your question for Uncle TechTip";a$
30 PRINT
35 PRINT "Uncle TechTip's Answer: "
40 PRINT
45 PRINT "Hmm, I don't know anything about"
50 PRINT " ";a$;" ..."
55 PRINT "Maybe a reader can help?"

“space acid poisoning …”

Thanks to users sbadger and lurkio on the stardot forum, I’ve been reunited the original BBC BASIC one-liner that begat 2d Star Dodge/Stardodger: Asterisk Tracker!

Asterisk Tracker

It was published in the December 1984 edition of BEEBUG Magazine (vol. 3, issue 7; page 9) and is credited to N. Silver.

It’s impossibly short:

1L=0:REP.L=L+3:MO.4:DR.1279,0:DR.1279,452:MOVE1279,572:DR.1279,1023:DR.0,1023:F.I=1TOL:V.31,RND(32)+5,RND(31),42,30:N.:P.(L-3)/3:X=0:Y=512:REP.PL.69,X,Y:X=X+4:Y=Y-(INKEY-74+.5)*8:U.PO.X,Y)=1ORX=1280:U.X<1280:V.7:REP.U.INKEY-99:RUN

It makes extensive use of BBC BASIC’s abbreviations, and the writeup even warns

… Here the programs are extensively abbreviated so that the line will fit into Basic’s keyboard buffer. Because of this, you cannot edit a LISTed version, and so, to allow for errors, it is best to spool out a copy of the text to tape/disc initially. This can be achieved as follows:

*SPOOL PROGRAM
type in program
*SPOOL

The program unwinds to something much more understandable:


   10 L=0
   20 REPEAT
   25   L=L+3
   30   MODE 4
   40   DRAW 1279,0
   50   DRAW 1279,452
   60   MOVE 1279,572
   70   DRAW 1279,1023
   80   DRAW 0,1023
   90   FOR I=1 TO L
  100     VDU 31,RND(32)+5,RND(31),42,30
  110   NEXT
  120   PRINT (L-3)/3
  130   X=0
  140   Y=512
  150   REPEAT
  155     PLOT 69,X,Y
  160     X=X+4
  170     Y=Y-(INKEY(-74)+.5)*8
  180   UNTIL POINT(X,Y)=1 OR X=1280
  190 UNTIL X<1280
  200 VDU 7
  210 REPEAT UNTIL INKEY(-99)
  220 RUN

The instructions are typical of the day:

The first game (called ‘Asterisk Tracker’) is a very simple game in which you have to guide a ‘snake’ across the screen, whilst avoiding the stars. As the game progresses, more and more stars will be displayed, and the ease of the game rapidly disappears. The Return key guides the ‘snake’ upwards, but it moves down if Return is not pressed. Aim your ‘snake’ for the gap in the wall, and don’t touch any objects as this causes instant death from space acid poisoning!

Um, yeah, N. Silver, whatevs …

It’s pretty amazing that three type-ins could fit on a page: especially when you consider that the BEEBUG magazine was A5!

beebug vol 3 issue 7 page 9

If you want to play it (and who wouldn’t? We wasted days on this game) you can either run this Asterisk Tracker alone in the browser: Asterisk Tracker, or lurkio has combined them into one, and put them here: Beebug One-Line Games (Asterisk Tracker, a Truffle Hunt clone, and a treasure hunt).

I just wish Graeme Smith were still with us to play this.

Rob Manuel’s British Council Tile / Bus Fabric Sim

Rob’s British Council Tile / Bus Fabric Sim — described here: Amstrad BASIC that approximates the tiling schemes that a local council might have used for a municipal building in the 1970s — is a joy. So few colours!

No, really: this *was* the seat pattern on Western SMT buses circa 1979

Because I care (and don’t if you don’t), here’s the Locomotive BASIC source, lovingly typed into the Caprice32 emulator then extracted as text using iDsk:


10 ' British Council Tile / Bus Fabric Sim
20 ' by Rob Manuel 2018
30 '
40 ' z/x - change char up/down (ascii)
50 ' space - random palette
60 ' c - show ascii val, inks & pause
70 ' v - random character (128+ ascii)
80 ' b - random char and cols
90 ' n - fill with same line & pause
100 'i - input ascii value
110 '
120 ON BREAK GOSUB 260:MODE 1:LOCATE 1,26
130 DEF FNs=INT(RND*255)
140 SYMBOL 255,FNs,FNs,FNs,FNs,FNs,FNs,FNs,FNs
150 DEF FNp=INT(RND*4)
160 DEF FNi=INT(RND*26)
170 GOSUB 470
180 GOSUB 270
190 o$="":i$=INKEY$
200 IF i$<>"" THEN GOSUB 380
210 FOR i=1 TO 40
220 w$=CHR$(14)+CHR$(FNp)+CHR$(15)+CHR$(FNp)
230 w$=w$+CHR$(c):o$=o$+w$:NEXT i
240 store$=o$
250 PRINT o$;:GOTO 190
260 CALL &BC02:PAPER 0:PEN 1:END
270 aa=FNi:bb=FNi:cc=FNi:dd=FNi
280 INK 0,aa:INK 1,bb:INK 2,cc:INK 3,dd
290 BORDER aa
300 GOSUB 320:RETURN
310 IF c>255 THEN c=32:IF c<32 THEN c=255
320 LOCATE 1,1:PAPER 0:PEN 1
330 PRINT "C:"c;
340 PRINT CHR$(c);
350 PRINT " ";
360 PRINT "I:"aa;bb;cc;dd;
370 LOCATE 1,26:RETURN
380 IF i$=" " THEN GOSUB 270:RETURN
390 IF i$="z" THEN c=c-1:GOSUB 310:RETURN
400 IF i$="x" THEN c=c+1:GOSUB 310:RETURN
410 IF i$="c" THEN GOSUB 310:CALL &BB18:RETURN
420 IF i$="i" THEN LOCATE 1,1:INPUT "ASCII?",c:GOSUB 310:RETURN
430 IF i$="v" THEN GOSUB 470:GOSUB 310:RETURN
440 IF i$="b" THEN GOSUB 270:GOSUB 470:GOSUB 310:RETURN
450 IF i$="n" THEN FOR i=1 TO 25:PRINT store$;:NEXT:CALL &BB18:RETURN
460 RETURN
470 c=INT(RND*128)+127:RETURN

And if you really care, here’s an emulator snapshot — BritishCouncilTileSim.zip

Update: I modified the code slightly (essentially, all INT(RND*n) to RND MOD n) so it would compile with Hisoft Turbo Basic. It works! It’s faster!

Snapshot: BritishCouncilTileSimCompiled.zip

*ALL* of the memory …

World domination soonish!

I’ve got a whole bunch of bytes free now I’ve upgraded my 6502 40th Anniversary Computer Badge to 32KB of RAM! I suspect I’ll end up as I usually do, Corvax-style …

BASIC on the 6502 badge

As if it weren’t nerdy enough, the 6502 40th Anniversary Computer Badge runs Lee Davison’s EhBASIC. There are 1024 whole bytes free for your programs, so it’s not exactly spacious. It’s got useful floating point support, though:

Yup, that’s the second most boring BASIC example program, after the quadratic root finder.

100 REM HERON ROOTS
110 EP=0.0001
120 INPUT "X";X
130 N=1:RN=X/2
140 PRINT"COUNT","ROOT","DELTA":PRINT"======","======","======"
150 DE=ABS(RN*RN-X)
160 PRINT N,RN,DE
170 RN=(RN+X/RN)/2
180 N=N+1
190 IF DE>EP THEN GOTO 150

Update: Josh got my badge working again (it wasn’t, for $reasons …) and I re-ran this code. If you try the code for X=100000 and larger, it won’t converge. You might want to add:

185 IF N>25 THEN PRINT "EPSILON TOO LARGE, EXITING":END

so that the loop will exit after 25 times. Alternatively, make the value of EP depend upon the size of X. Aren’t numerical analysis and floating point foibles fun?

importing Applesoft BASIC programs on the Apple IIe

Just what no-one has needed since about 1979 or so …

BASIC on the Apple II has no easy way to import text as a program. When you LOAD a file, it must be in Apple’s tokenized format. While Apple DOS has the EXEC facility to run script files as if they were typed from the keyboard, it’s very picky about the file format:

  1. There must be a carriage return character (CR, ASCII 13) before the first line
  2. All line numbers must have an extra space before and after them
  3. All tokens must be in upper case
  4. All tokens (keywords and functions) must have a space after them.

The right way to do this conversion would be to write a tokenizer that spits out the correct binary file. But you can (kinda) fudge it with this shell command, operating from BASIC source PROG.BAS:

sed 's/^[0-9][0-9]*/& /;s/^/ /;1s/^/\n/;s/$/ /;s/[:()]/ & /g;' PROG.BAS | tr '\n' '\r' | ac.sh -p EG.dsk PROG T

ac.sh is the command line version of AppleCommander, and the file EG.dsk referred to above is an Apple DOS 3.3 image created with

ac.sh -dos140 EG.dsk

It still needs work, as there are functions that will mess this up, and Applesoft’s parser makes a mess of code like IF A THEN …, turning it into IF AT HEN ….

So if I wanted to import the following futile program:

10 REM A FUTILE PROGRAM BY SCRUSS
20 HOME
30 FOR X=1 TO 20
40 PRINT SPC(X);"FUTILE"
50 NEXT X

Run through the script (but before EOL conversion) it would look like this:

 10  REM A FUTILE PROGRAM BY SCRUSS 
 20  HOME 
 30  FOR X=1 TO 20 
 40  PRINT SPC ( X ) ;"FUTILE" 
 50  NEXT X

Make a disk and put the modified program text on it:

ac.sh -dos140 futile.dsk
sed 's/^[0-9][0-9]*/& /;s/^/ /;1s/^/\n/;s/$/ /;s/[:()]/ & /g;' futile.bas | tr '\n' '\r' | ac.sh -p futile.dsk FUT T

Load the disk into your Apple II, clear out the init program, and import the code with EXEC FUT:

If all you get is ] cursors printed and no syntax errors, then something might be working. List it:

Run it:

Disk image: futile-AppleII-dsk.zip, containing:

$ ac.sh -l futile.dsk

DISK VOLUME #254
 T 002 FUT 
 A 002 FUTILE 
DOS 3.3 format; 134,144 bytes free; 9,216 bytes used.

“The Error Message as a bourgeois construct”

If you try to run the (unmodified) BASIC code for Oregon Trail (1975) on PDP-8 BASIC, you get this:

 DI 30
 XC 45
 XC 205
…
 IF 700
 NM 730
… (many, many more lines …)

I thought at first it was a stack trace, but nope — it’s error messages! You need to dig through your trusty language manual, and on page 132 it has a table to explain:

DI ERROR IN DIM STATEMENT
IF ERROR IN IF STATEMENT
NM MISSING LINE NUMBER
XC CHARS AFTER END OF LINE

(and yes, they’re in all-caps. Mixed case? Mixed feelings!)

So whenever Python throws a tantrum (or as it calls it, an exception) and wails at length about its problems, remember PDP-8 BASIC: Two letters + a line number. That’s all.

TYPE BANG: First Person Shooter, 1975 style

— from the source code of an early (1975) time-shared system version of The Oregon Trail, as documented in On the Trail of the Oregon Trail.

Fun things you learn from old computers …

The program on the left is running on the decimal interpreter, the one on the right the regular one

Microsoft used to supply two versions of its BASIC for Macintosh. One used decimal mathematics for precise tallying of small amounts. The other used the more familiar floating point mathematics, rounding errors and all. I don’t know what floating point library Microsoft used for sure — perhaps Motorola’s 32-bit Fast Floating Point system — but it introduces rounding errors pretty quickly. Modern routines don’t start displaying oddly until after 15 decimal places.

Consider this simple program:

10 LET x=36/10
20 LET a$="## #.#"
30 FOR n%=1 TO 18
40 PRINT USING a$; n%; x
50 LET a$=a$+"#"
60 NEXT n%
70 END

Along with the number of decimal places, it should print 3.6, 3.60, 3.600, 3.6000, … with an increasing line of zeroes after the 3.6. Bas makes a valiant but typical attempt:

 1 3.6
 2 3.60
 3 3.600
 4 3.6000
 5 3.60000
 6 3.600000
 7 3.6000000
 8 3.60000000
 9 3.600000000
10 3.6000000000
11 3.60000000000
12 3.600000000000
13 3.6000000000000
14 3.60000000000000
15 3.600000000000000
16 3.6000000000000001
17 3.60000000000000009
18 3.600000000000000089

Oddly enough, good old Locomotive BASIC on the Amstrad CPC does it more correctly somehow:

So the variables, they vary.

cbmbasic for BASIC Computer Games

Immersive it ain’t, but you have to remember it was 1978 …

cbmbasic is pretty cool. It’s a portable C rendition of the Commodore 64’s ROM BASIC interpreter. While not the spiffiest version of the language, it does allow some very old code to run — such as the games from David H. Ahl’s book BASIC Computer Games.

Here are all the programs automatically converted to cbmbasic’s tokenized format: cbmbasic-Ahl-BASIC_Games. They seem to run, but some might fail. Notes on sources of the text files and conversion methods are in the archive. Have fun!

ESP8266 BASIC is seriously neat!

screenshot-from-2016-09-19-22-27-57That picture might not look much, but it’s doing something rather wonderful. It’s a tiny ESP8266 BASIC script running on a super-cheap ESP8266 wifi module. The code draws a clock that’s synced to an NTP server. ESP8266 BASIC graphic commands are built from SVG, so anything you can draw on the screen can also be saved as a vector graphic:

The runtime includes a simple textarea editor that saves code to the board’s flash:

screenshot-from-2016-09-19-22-28-53(and yes, that first line is all you need to set up NTP sync)

Among other features, ESP8266 BASIC has a simple but useful variable display:

screenshot-from-2016-09-19-22-30-17I’d picked up a (possible knock-off of a) WeMos D1 ESP8266 board in Arduino form factor a few months ago. The Arduino.cc Software now supports ESP8266 directly, so it’s much easier to program. Flashing the BASIC code to the board was very simple, as I’d noticed that the Arduino IDE printed all of its commands to the console. All I needed to do was download an ESP8266 BASIC Binary, and then run a modified Arduino upload line from the terminal:

~/.arduino15/packages/esp8266/tools/esptool/0.4.9/esptool -vv -cd nodemcu -cb 921600 -cp /dev/ttyUSB2 -ca 0x00000 -cf ESP8266Basic.cpp.bin

ESP8266 BASIC starts in wireless access point mode, so you’ll have to connect to the network it provides initially. Under Settings you can enter your normal network details, and it will join your wifi network on next reboot. I just hope it doesn’t wander around my network looking for things to steal …

Running FreeBASIC on Raspberry Pi

Hey! This is yet another of my ancient posts about Raspberry Pis that probably contains out-of-date information. In order to run FreeBASIC on a Raspberry Pi, all you need do is:

  1. Download a nightly build
  2. Unpack it and run the installer.

That’s it! You can access GPIO with FreeBASIC, too: GPIO LED Blink using FreeBASIC and WiringPi

FreeBASIC is a pretty nifty cross-platform BASIC compiler. It uses a Microsoft-like syntax, has an active user and developer base, and is quite fast. Building the latest version on a Raspberry Pi is a bit of a challenge, though.

FreeBASIC 1.01 demo running on a Raspberry Pi
FreeBASIC 1.01 demo running on a Raspberry Pi from Geany

Part of the problem is that FreeBASIC is mostly written in FreeBASIC, so you need a working compiler to bootstrap the latest version.

Update: you’re probably best just downloading the binary install packages from the FreeBASIC site. I’m having difficulty getting recent (late 2016) source packages to build for reasons that would take too long for most people to care about.

The following steps worked for me:

  1. Install some necessary packages:
    sudo apt-get install build-essential libncurses5-dev libffi-dev libgl1-mesa-dev libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev ncurses-doc libxcb-doc libxext-doc libgpm-dev git libcunit1 libcunit1-dev libcunit1-doc

    (You don’t really have to include the cunit packages; they’re only needed if you run tests before installation.)

  2. Download a nightly binary from Sebastian’s server: http://users.freebasic-portal.de/stw/builds/linux-armv6-rpi/  and install it:
    unzip fbc_linux_armv6_rpi_version.zip
    cd fbc_linux_armv6_rpi/
    chmod +x install.sh
    sudo ./install.sh -i

    Don’t delete the installation folder just yet.

  3. Grab the latest version of the source from github:
    cd
    git clone https://github.com/freebasic/fbc.git

    Change directory to the new FreeBASIC source folder (cd fbc), and type make. (or, on a Raspberry Pi 2 or 3, make -j4 to use all the cores …). After a while (in my tests, about 52 minutes on a 512 MB Raspberry Pi, or around 6½ minutes [!] on a Raspberry Pi 2), it should finish. If there’s a bin/fbc file, the compilation worked!

  4. Before you install the new compiler, uninstall the old one: change directory to the fbc_linux_armv6_rpi folder, and type:
    sudo ./install.sh -u
  5. Once that’s done, go back to the new fbc folder, and type:
    sudo make install

And you’re done! You can delete the fbc_linux_armv6_rpi folder now. If you don’t mind it taking up space, keep the fbc folder to allow you a quick rebuild of the latest version of the compiler with:

cd fbc
git pull
make
sudo make install

Note that this will build a native armv7l compiler on a Raspberry Pi 2, and an armv6l one on a Raspberry Pi. This means you can’t run binaries you built on a Raspberry Pi 2 on a Raspberry Pi (you’ll get an Illegal Instruction error), but you should be able to run ones built on a Raspberry Pi on a Raspberry Pi 2. Binary compatibility is overrated, anyway …

Serious nostalgia…

Atari_ST-Fast_Basic

Oh man — emulating an Atari ST. It’s 1987, and I’m back in that computer lab on the first floor of the James Weir Building

(Jeremy Ruston went on to write TiddlyWiki, amongst other things.)

Running X11-Basic (almost perfectly) on Raspberry Pi

Update: Markus Hoffmann uploaded a new version of X11Basic-1.20.tar.gz to SourceForge that addresses most of these problems. I’ve edited the article to remove the obsolete bits.


More than 20 years ago, I really liked GFA-Basic. It ran blindingly fast on the Atari ST, and when it didn’t crash on the Amiga, it ran blindingly fast there too. I even wrote a review of it for comp.sys.amiga.programmer, which you can read to this day in all its textual glory. One of the e-mail addresses in that article still works, too.

I still sometimes think in BASIC, and there is much wringing of hands (not by me, really) that there isn’t a good interpreter for Raspbian on the Raspberry Pi. So when I found X11-Basic — a cross-platform GFA-Basic-like system — I had to take a look.

While I have managed to get X11-Basic demos to run, I have to say it’s not running super well. I’ll show you how to install X11-Basic 1.20 and get it (mostly) running, but it’s a bit rough on the ARM. Incidentally, these instructions also work on Ubuntu 12.mumble LTS on x86.

First, you need to install some (okay, a lot of) packages:

sudo apt-get install libreadline-dev tcsh libncurses5-dev xutils-dev libc6-dev libsdl1.2-dev libtool

Now download and extract the package:

tar xvzf X11Basic-1.20.tar.gz
cd X11Basic-1.20

For X11Basic-1.20, you have to issue an extra command before the standard ‘./configure ; make ; make install‘ sequence:

sudo mkdir -p /usr/local/share/man/man1
./configure
make
sudo make install

This is enough to make a working xbasic interpreter. I made some screenshots of some of the graphics demos —

Screen Shot 2013-03-08 at 16.34.51 Screen Shot 2013-03-08 at 14.59.37 Screen Shot 2013-03-08 at 14.57.21 Screen Shot 2013-03-08 at 14.54.08 Screen Shot 2013-03-08 at 14.49.48As you can see, there’s some screen corruption, but most demos just worked. Incidentally, the Mandelbrot one took almost 1¼ hours to run. Took me right back, that did (or it would have, if I hadn’t been outside bombing about in the slush on my bicycle while it churned away).

In order to see just how fast the interpreter is, I ran the formerly fearsome Personal Computer World Benchmark #8 under X11-Basic. PCW#8 used to bring 8-bit home computers to their knees, typically taking more than a minute to run. Here’s the code, indented a bit and with a timing wrapper added:

	LET start=TIMER
	LET K=0
L30:
	LET K=K+1
	LET A=K^2
	LET B=LN(K)
	LET C=SIN(K)
	IF K<1000
		GOTO L30
	ENDIF
	PRINT TIMER-start
	QUIT

(yeah, GFA-style BASIC isn’t too pretty …)

It takes about ¼s to run. The old BBC B was supposed to take about 50s. By comparison, X11-Basic on a manky old dual-core Atom took 0.04s.

The native compiler xbc seems to work. To make a standalone binary of the above code, you do:

xbc -o PCWBenchmark PCWBenchmark.xbas

The compiled binary runs roughly twice as fast as the interpreted code. Not blazing fast, but a useful increase.

Unfortunately, the bytecode compiler xbbc doesn’t actually do anything on the Raspberry Pi yet. So here I leave it up to you to play with X11-Basic, and see what it can and can’t do.