 Sorry for the delay, technology difficult. This talks about basic code. Basic code was a cross-platform basic API that arose from the Dutch hubby scene back in the 1980s. And it's quite interesting because it's an example of a bunch of geeks really coming together, having a problem, solving it, and this kind of taking off for about ten years after that. Essentially the summary of it is they want to find a way of transmitting software over radio that would work on many different kind of 1980s microcomputers. So this talk has a bit of a history focus, but it should also, if I have time, be a retro computing demo at the end. If I can go to the next slide. That doesn't seem to be the case. I'm sorry about the horrible technology. So just to set the scene, in the early 1980s, it became possible to create computers that would fit on somebody's desktop. So these were microcomputers because they were small compared to the computers people were used to at the time. And everybody really wanted to jump onto that bandwagon. So basically every typewriter manufacturer, every radio manufacturer, went and built one of these microcomputers. So we can see here some examples. There's a Commodore Pet. There's an Apple II. There's a Tandy Radio Shack 80, also known by people who love it as the Trash 80. And a Philips P2000T. And that's the thing called the XD Sorcerer that I hadn't heard of ever before doing this talk. So these, as you can see, especially the pet, it shows you it has a cassette player, the P2000T has a cartridge. Some of these had floppy disc players, but audio cassettes were really the way of getting software into these things. And generally also these things would boot into BASIC. They wouldn't really have an operating system. They'd have a BASIC, and it would be a Microsoft BASIC. Microsoft had really cornered the market for 8-bit BASICs back from the time when they had built MITS Altair BASIC, which fit in 4K, which was really a cool thing at the time Microsoft did cool things. And so everybody who built one of these essentially went and bought BASIC from Microsoft, except Apple, they built their own. Now that doesn't mean they were the same BASICs. So Microsoft has a Z80 BASIC and a 6502 BASIC, but all these manufacturers, they wanted something special for themselves. So they licensed it, they made some changes. In the end, all of these BASICs were similar, but incompatible. So just to show some simple BASIC program, just also to set what it's programming like in this awful language. This is TRS-80 BASIC. So you can see a four-next loop, clear the screen, and then you can do some format of printing in TRS-80 BASIC. It was quite spiffy. You couldn't do that in Commodore BASIC. So to clear the screen, you had to print character 144. Clear the screen if you did that. But in Commodore BASIC, you could leave out the spaces. So it would take up fewer bytes on your arm. So it was also less readable. And this is Apple BASIC down here. Nice and neat, of course. But to clear the screen here, you'd use the text command. So one of the things you can see, for instance, is a simple thing, clearing your text screen, three BASICs, very similar, but all different commands. Do that. So that's a problem. And that's the problem we'll get back to. But before we go, there's how you've got one of these BASICs. How do you get software in there? Well, you could go out and buy a tape, but I certainly didn't have the money to do that. So you didn't really. So you could swap tapes with your friends, if you had friends, unlike me. Or you could get some magazines, and they had printed programs in them. And you would go and type the programs, and you would run it. And your computer would crash. And you'd forgot to save it. You'd have to start all over again. This time you saved it, ran it, didn't run, because there was an error. So you could find which line was the error in, try and fix it. It took hours and hours, but if you're a child, you've got time. So these are the kind of things. So there were tons and tons of magazines. You can find a lot of them on the internet these days. Computed magazine, creative computing. A lot of them were specific to one particular platform. So here I can see an A1 and a Sinclair one. I just ripped these pictures off the internet. But this is from, I think, Compute, but I'm not entirely sure. But generally, this is kind of the sort of hell you had to type in. And also, if the magazine you had, you know, had a nice game, you wanted that, but you didn't quite have an Atari, you had a Commodore, so what you could do is try and type it in and start modifying it until it worked on your Commodore. And that was not easy, because all these basics were different. So some magazines would helpfully give you some hints as to what you would have to change for a different platform. So maybe on a Commodore, you have to change this command. On IBM, this is a bit later, because IBM BC came up a bit, became popular a bit later. You'd have to change it here. Some magazines came with really helpful cheat sheets. This is from Personal Computer Magazine, Dutch Magazine, which essentially gave you sort of basic commands and how they worked in all various different kinds of basics. So there's like 20-ish different platforms. They're all slightly different. They're very similar here. This was like an A2-sized poster. I think we had one in school. But generally, it's still quite unsatisfactory. You have to type all this stuff. So what people really want it was some way of downloading stuff. I mean, this is not a term that people use at the time. But apart from the sort of the magazine scene, there was also a scene of radio amateurs. There was a scene of people doing cool stuff on the radio. They were often electronic geeks. They were often interested in computers. And one of the things they were trying to think is like, can we transmit computer software over radio? And the first side is obvious, right? Because these things work with audio tapes. So there's an actual audio cassette. I think people here are mostly old enough to know it. It was actually sound recorded on a tape. It was modulated much in a way a modem does it. And so that sound was played into the computer. It was modulated and turned it back into a program. So at first, this is what they tried. So they had like four target platforms. I was thinking about a particular radio program, which is Hobbyscope, which was a Dutch, NOS is a Dutch broadcaster had this program once or twice a week, I think. And they did a lot of experiments with radio. They were allowed by their bosses to do stuff, to break stuff and do interesting stuff. So they tried doing stereo when everybody else did mono. And so they could make noises and stuff because programs on audio, it's fairly awful noise. It's a lot like pulling your nails down a blackboard. I think you're kind of old enough to know what a blackboard is. But here is one. I'm not going to do it. But in any case, so you had four different platforms. Well, actually, they all had cassettes, but they all did it in a slightly different way. So if you have a weekly program, you're not going to spend hours scratching on blackboards. So maybe you could do one Commodore one week, the next week you do an Atari, et cetera. So this took forever. And moreover, a lot of these modulation schemes, they were designed for on a cassette. It's not that much noise compared to a radio. So quite often they weren't robust enough to survive radio transmission. So this didn't really work. It was a great idea. It didn't really work. But they sort of, they kept on with it. Sorry, checked the time occasionally. And so they thought, well, you know, this problem we can solve. We can kill two birds and one stone here. What if we design our own modulation scheme? We take one that we know is robust to radio transmission. And we're going to write software for each of these four platforms that we're looking at. It was actually the four that I showed before. So it was the PET. It was a TRS-80. It was the XDSorcer. And it was the Apple II, I think. Philips Pete 2000 came later. So we're going to write programs. We're going to sell them. So people will pay us money and we send them the tape. And that will demodulate this sort of standard scheme based on the Kansas City standard, if that means anything to you. And this way we can transmit one program in one go and people can record it, use this program to decode it and use it on their machine. So just to show you what this looks like, this is how the SJ would be transmitted. It was a 1200-boud scheme, which means 1200 bits per second. It had some start bits, some stop bits to frame a byte, 8-bit bytes, unlike the PDP that we saw earlier in one of the main talks. And it had sort of a pilot tone at the start and some error correction. There was a checksum at the end. The bit would be in least significant first, the byte. So actually what we're seeing here, and also for some reason that eludes me the last bit. So that's the most significant bit was inverted. So actually we have 0101010, which, if you're quick with binary, is the ASCII code for letter J, number 74. So this worked very well and they were very proud of it and they were so proud of it that they did a television transmission. And there's a still here of that. So this was in 1981. Again, a Dutch program called Horizon. And on TV they showed somebody transmitting this program and people sort of loading it into their pets and I don't really recognize these other machines, but into five different machines and they could load it and had to do a bit of modifications and then they could run it and, well, it was brilliant. I mean, oh, to be alive in such an age when this is possible, right? So now it's brilliant to the point now we solve the transmission problem. What we haven't solved is the compatibility issue. Remember, all of these basics were, like, annoyingly slightly different. Like, for this clearing the screen was difficult. So these people would have to go in and change the clear screen command to whatever it was on their platform. So the next step they took, so what we just saw was basic code version one, the next step they took in 1983 was what if we abstract that stuff out? So all the sort of standard things we want to do a lot, like clearing the screen, removing the cursor to a certain position on the text screen. To start it was all text-based. What if we write routines for that? Now, basic didn't have named functions. It didn't have named procedures. You could go into line numbers. You could jump to a line number, but you could jump to a line number and then jump back to where you were before, which was the go sub command. So go sub jumps into a subroutine. So they defined standard subroutines. Subroutine number 100, 100 would clear the screen. So instead of writing CLS on one and text on another, you'd write go sub 100. And the next version, the version two of the demodulation program would actually include a standard set of subroutines for your platform onto the program that you just downloaded. So you wouldn't just see this. You would see a bunch of code on top of that, which defined subroutine 100. It would define the go to 20s bit alt-right because you don't see it coming back, but it jumps back to 10-10. It couldn't be a subroutine because they had to change, they had to clear the memory at that point and that would drop the go sub stack, obviously. So you couldn't actually go sub into 20. It had to go to in it and it would jump you back to 10-10. So this is the same program I showed before. This is a simple thing that prints false dem and then with an increasing line number runs over it and then sort of goes back and does it all over again. It's a bit silly, but I had to write something quickly. But this was the real innovation actually this API again, modern parlance that defined these go subs that would do the things that you'd want to do but were difficult in different versions of basic that really made things take off. So suddenly you could actually download a program over radio and they were actually transmitting these programs and people were using them. So this was all still on Dutch radio first and it really caught on and other broadcasters got onto it. So particularly the BBC, British Broadcasting Corporation you might be aware of it. They had a program called the chip shop which was about computers. What's happening in the world of computers something in those lines and they started a chip shop take away service. So the chip shop take away service they would transmit basic code software and they would basically use the same programs that sorry this is not going to work. I'm not very good with technology sorry. I had the sound thing but I can try it at the end if it's time or not I'm not going to try it now. So the BBC got into the game the West Germans initially got into the game they published a book and they had a few transmissions it really didn't really get big in West Germany at the time but it was big in the Netherlands it was big in the UK for a while and in particular on schools there were lots of educational software where people called this the Esperanto for microcomputers at the time that meant something to people Esperanto was this international language that was going to replace English, never happened and so I'm not really going into this but it won't surprise you in sort of this being an open source conference that will cause the fork between version 2 and version 3 was this agreement about the licensing and that another broadcaster came in there was a third version did colouring graphics and it was cooler but stuck with the old version but the interesting bit at least a bit I find quite fascinating is that towards the end of the 80s and towards the end of the life of the German Democratic Republic East Germany it actually, so in early 1981 now we thought they just had 40 years of East Germany they thought there would be another 40 years the war was going to be there forever so previous speaker mentioned already like across the Iron Curtain this was a completely different world it was a bit mysterious and we didn't know about it so the German Democratic Republic they built their own computers so this is Robotron so the Volkswagen Betriebe Robotron sort of the state company that built computers so these were used but they were very difficult to get so they like companies would have them in schools maybe with people at home quite often they'd have western computers if they could get their hands on them so what Radio DDR wants to do so the state broadcaster was they had a sort of 10 course basic how to do programming in basic and they built it for Robotron computers because obviously that was their own stuff and they also wanted to transmit software over the radio and they did that for Robotron they kind of ran into the same issues as people had in the West and interestingly obviously Berlin divided city people in the West could listen to the Eastern Radio interestingly there was a listener in West Berlin who also listened to Dutch Radio because this was transferred to Dutch broadcasts where a medium wave goes quite far so you could actually get it in Berlin and Dutch being close enough to German for this guy to understand basically what it was about he was aware of this basic code protocol and his basic code software and he wrote a letter to Radio DDR saying are you guys aware of what's happening in Holland and this could be interesting for what you're trying to do with your basic codes which are very much like etc so they did and they were very enthusiastic and they sent a delegation to the Netherlands to have some negotiations and essentially they licensed basic code to use it in East Germany now around about this time in the West the IBM PC really started to dominate and there wasn't really a need for basic code anymore especially in the early 90s people didn't really need this anymore but in this way in the East for a few more years even though the DDR stopped existing for a few more years it sort of had a lease of life on East Germany there's an interesting picture of a vinyl record which they use instead of cassette tapes because cassette tapes are rare and difficult to get here we get to the sort of retro computing part of it so today we have a replacement of basic code today we have JavaScript which is also an ugly language which is also the first language people there when they go into school and they sort of try and do little things and it works on every platform and yeah to me the obvious thing was well if you have a basic code implementation in JavaScript so I built a basic interpreter doing exactly that I wasn't the first one to do that but it's better mine's compatible with basically every basic code program I could find and the other thing I did was document every basic code program I could find taking it from the original audio putting it on the internet so it's all in Github these days I was hoping to demo this but that means I need to do scary things with technology but basically the way it works is you put a script tag in and rather than having a standard script you call a text basic code and this little script I wrote will replace them all with a canvas and start running the interpreter and basically run your programming here are some examples this one I wrote myself and these are just sort of old, it's a Russian course Pythagoras 3 Sun and Moon sort of these were the sort of educational things that you could get on basic code at the time the interpreter is fairly standard of fare I've got little background in doing this I probably reinvented the wheel a hundred times but there you go now let me just first show you the last slide and then I try and go into the demo because I'm not sure about whether that's going to work or not but this is just a thank you to a lot of people I mean I ripped most of the contents of this talk from these people and these publications there's a bunch of links on the on the GitHub place where you can also find all the basic code and a link to the interpreter and the demo that I'm trying to make now which I have really no idea what I'm going to make that work yeah I might be able to right so I've got two, so here's actually the program I just showed and this is what it does it's really fascinating but so let's see if I now I need to get to yeah so this is one of the programs one of the educational programs that was published so it will show radioactive decay we're not going to read stuff instructions so let's just jump into the experiment and just show how radioactive decay worked and you basically see these atoms decaying until not many are left and then I think I would tell you how long it took or what the half-life was well anyway yeah so this tells you the instructions so this is kind of an example of one of the early ones you'd have you'd have some educational things but you'd also have little games like here there's a car race I don't want instructions because I don't have time and okay again yes so this goes way too fast but you kind of get the message yeah this is going to draw everybody's attention also because our kind hosts are this is you'll notice statue in Brussels right Monica Piss and it's a little boy that pees and I think I need to sort of give it a power and an angle and then so I missed you I need to pee into the little pots over there so I think I need more power the mouse cursor is in the way yeah sorry I mentioned I was bad at technology didn't I well that's not too bad but yeah too much power so again you know it's kind of educational it teaches you something about the list in a way that captures people's attention and also think at this point I am kind of running out of time if we want to do any more questions so let me are there any questions let me just put myself back to the oh this is not going to work is it okay are there any questions yes so the question is why doesn't the modulation that was used on cassette work on radio because it's very similar so the answer to that is it sort of works but it was often I think too fast and not it might not have a lot of framing bytes of things that would make transmission more robust so kind of error correction features there weren't a lot of error correction features in here but it was quite a slow transmission rate and it was done in a way that people knew was fairly robust against the noise radio has just a lot more noise than cassette tape has and I think that was the problem they mainly tried to solve and that was why some of the modulation schemes on cassette didn't really work very well yes so I think if you if you're really over there's a word for that I forgot but yeah if you put it away in the red if you over saturate it yeah then you mentioned it worked better I think that's because then you kind of forced it to be a square wave and I think the software did just much better with square waves so I think that was one you sound like you did this at the time I tried at the time I couldn't I never made it work so you know I caught up later there's a question at the back it's a good question how many people have actually used basic codes well that's quite a lot of people that's really good to see so if you if you want to you know go back to the old times you know nowhere to go the sample yeah let's try and go to the sample well this is from the chip shop but see my problem is if I go here maybe would it yeah it's just that ah hey thank you can we hear it now is there a play button yeah there was can we hear anything I can try and play it here and turn it up loud but I'll have to turn on the screen ah yes can people hear this oh sorry yeah running out of time and I can't get to the slide there because this sort of thing gets in the way sorry I'm just I think we've run out of time so sorry about that we can try if people are interested to show you how it sounds yeah you get some if you've ever heard a modem it sounds a lot like that yeah so I'll stop taking up the time with the next speaker so thanks very much for your interest