 I have an old computer. This is an Amstrad NT200 laptop computer. This is one of the very rare 8-bit laptops. This machine actually contains a Z80 processor and a whole 128 kilobytes of RAM. This came out in about 1993, which is very late for a Z80-based machine. And this laptop is pretty high-spec for a Z80. It's got a high-capacity floppy disk drive, PCMCIA slot, space for about 10 hours of battery life, a whole suite of software and ROM, and inside, an excellent keyboard and an even more excellent screen, which you shall see in action later. The size is a bit weird. It's 480 by 128, but that's still sufficient to get 80 columns of readable text on it. Now, Amstrad originally intended this to be used with its own productivity suite of software in ROM, which is actually pretty good. I may do a video about that later because it's actually worth looking at. But I am not going to talk about this. I am going to talk about this. This is a floppy disk. On this floppy disk is a port of the CPM operating system, which I have done for this machine. The problem with CPM is that it dates from about 1977, and the entire operating system is only about 5 kilobytes. And this is a 720K floppy, which leaves me with quite a lot of space to deal with. So what I've done is I have gone and downloaded 700Ks worth of random CPM stuff from the archives dating from about 1985, put it on this disk, and what I'm going to do is to run CPM on this machine and show you just what CPM could do with a single floppy disk back in the 80s. So, I've moved the camera so that you can now see the screen, although this does mean that I am essentially cuddling the camera tripod, so my typing is going to suffer. So let's fire things up. Here's the built-in ROM software. Set the disk, press the magic command, and here comes CPM. And the first thing you may notice is it actually looks pretty similar to DOS. And this is true, but actually works the other way around. DOS was heavily based on CPM, although significantly more sophisticated, although nearly everything is sophisticated compared to CPM. It's an incredibly minimal operating system. The OS core itself is 3.5K, and this contains a file system, and that's about it. So there's no processors, there's no memory management, there's no concurrency of any description. All it essentially does is allow you to load programs off disk, run them, and give them a way to talk to the disk drive. The console itself is implemented in the BIOS, the add-on module that actually talks to the hardware. The OS itself is a single modular unit and can be trivially swapped in and out for alternate versions. There are several, I've run some of them on this. So this is the contents of the disk, it's a bunch of files, you don't get directories as such, there's a thing called user areas which I won't go into. Most of this is stuff I got and put on the disk. The top few are the built-in things you get with your CPM system, and the most important ones are ed.com, which is a text editor, and I'm not even going to look at that because it's like edlin but worse, asm, which is the assembler, load, which is the linker, and DDT, which is the debugger. So with a text editor, an assembler, and a debugger, you can develop software out of the box for CPM, you don't need any other tools. I mean it helps, for example if you use the VDE text editor, then you don't have to use ed to edit files. Here is a Hello World program, which I prepared earlier, in machine code. So let's just tweak this a little, go up to here, Hello World, from assembler, save, quit, quit. So let's assemble that, this is with a built-in assembler, there we go. And now that's generated an object file, so we need to load it. That is turn it into a executable, which it's done. Now we can run the hello command, hello world from assembler. And we can use the stat command to have a look at it. And we can see that it contains one record, and a record is 128 bytes in CPM, occupying 2K of disk space. Yeah, assembler files tend to be small, but they're a pain to write. It would be really nice if we could write in some high-level language. How about C? I have a version of our Hello World program in C. This is KNRC, which is the pre-ANSI version, Hello World from C. There are ANSI compilers for CPM, high-tech C is the best, I know of. But it's very slow, very big. It doesn't really fit in CPM, but it works, it generally is quite good code. But BDSC is smaller, simpler, and that's the one I'm going to demo here. There we go, compiled. We do have to link it, which we use using BDSC's own linker, and that's done. So we can stat the hello.com file, and we can see it contains 27 records, and it's 4K, which makes it quite big. I mean, it works. But KNRC isn't like a great language. What we want is something more scientific. How about Fortran? Yep, I have a Fortran compiler here. This is Fortran 4. Fortran 4 is a horrible, horrible language. It took me way too long to make this Hello World program work. I'm not going to edit it, because the last time I did this, it stopped working, and I didn't know why. So I'm just going to quit out and compile it. This is Microsoft Fortran, so the syntax is weird. The Fortran compiler itself is reasonably nippy, but you then need to link it using Microsoft's linker with equally strange syntax, and this is pretty slow. You'll be seeing this linker again later. This, by the way, from the copyright date, notice 1981, so it slowly, slowly links and finishes, and it has generated a Hello World program, which, because it's Fortran, says, Hello, World stop. Yeah, go figure, Fortran. It's 52 records, 8K is quite big for a program. It's all library overhead. So Fortran is great for scientific work. How about something more business related? You've got that. You don't get much more business than COBOL. So here is our Hello World in COBOL with an identification division, environment division, configuration section, data division, working storage section, procedure division, and one line of actual code. I haven't implemented the repeat key yet. So Hello World from COBOL, close quote, save. So we invoke the Fortran compiler with the COBOL command. This is Microsoft COBOL. So the syntax is, oops, that's not right, Hello equals Hello. The syntax is similar to the Fortran one, but different, subtly so. Compiler loads and invokes. 1982, this compiler was written. OK, so we link it. Hello slash E, hello slash N. Yeah, this linker gets old very quickly. It's just painfully, painfully slow. OK, and we have our Hello program. Hello World from COBOL. It's actually quite small, this one. If we stat it, we can see it's only seven records long. That's because it actually cheats. Most of the COBOL runtime is in this command here called RunCob. Yeah. Anyway, let's have something a bit faster, a bit more, a bit more turbo. Now, this is what people actually tended to use. This is Turbo Pascal, which is justly famous for usability, speed, ability to be useful. Well, I'll show you. Let's edit our Pascal file. And this is like an IDE. This is its internal editor we're looking at here. So Hello World from Pascal, oops, Pascal, spelled correctly. It doesn't save, it just held it in memory. Now it's in memory, I can just compile and run it in memory. Done. Hello World from Pascal. No disk access, less than a second on a four megahertz Z80, I should add. Or we can go to options, compile com file, compile. And it's now generated our hello.com. So we can quit out of Pascal. Oh yeah, it wants to know whether I want to save the changes I made. So yes, saving and hello. Hello World from Pascal. How big is it? Can't type. It is 65 records, 10K. OK, that's the downside of Turbo Pascal. It's not particularly small. Most of that is library, but still. So we've done C, we've done Fortran, we've done COBOL, we've done Pascal. What did people actually mostly work on this? What language do people mostly tend to work in? Basic, Microsoft Basic. Yes, of course we have that on this. Here is Microsoft Basic. It's the same Microsoft Basic that they ported to every other system. So 10 print, hello world from basic, run hello world from basic. Very exciting. It was cheap. It was cheerful. It had a complete development environment. You could debug it interactively. But it's Microsoft Basic. I didn't like Microsoft Basic. It was very, very primitive. I'm much preferred BBC Basic. I have this too, which had named procedures and everything. So we can do 10, repeat, 20, print, I can actually type properly, print hello world, 30 until false. Here's our program. It's even indented and everything. Run it. Hello world. There we go. Basic. But basic is not a brilliant language. What we want is something, something about fourth. We've got fourth. Here's fourth. It's a bit minimal. So we can write our hello world program like so. Print a carriage return after printing the text. So that allows to find a new word which does hello world. So I can say hello and it prints hello world. I can say hello, hello, hello. Print hello world four times, three times even. Yeah, that's fourth. So what else do I have on this? I can't be bothered with more programming languages. I've had a hard day developing software and CPM. What I want is to play a game of some description. What games does CPM have? It's got Zork. In fact, it's got nearly all the InforCom adventures. This was one of the machines they sold adventures for. So we are standing in an open field west of the White House. There is a small mailbox here. Open mailbox. Zork is a game of adventure, danger, and low cunning. Yeah, I'm not very cunning. Let's just quit. So on this 720K floppy disk, we have an assembler. We have a C compiler. We have a Fortran compiler. We have a Kobo compiler. We have a Turbo Pascal. We have Microsoft basic. We have BBC basic. We have fourth. And we have enough space left over for a game. This is a 720K floppy disk. And we have 126 caves free space. I could probably have found something else to put on it, but I just ran out of ideas. Oh, and we have a pretty good text editor as well. Two of you include Turbo Pascal's. Did I mention this is a 720K floppy disk? We haven't even changed floppies yet. There's a lot we can learn from CPM. You don't need much to do a lot with. You can actually develop software on this machine today that's useful. I mean, you'd be mad, but you could. Personally, I would probably either do it in BBC basic or Turbo Pascal. Turbo Pascal is still sold, I mean, for PCs, not for CPM. But yeah, here you have it, 1980s computing. Not much different from modern computing, except much, much smaller. I hope you enjoyed this quick look at CPM. I actually have another CPM laptop in the post coming towards me, so you'll get to see that when it arrives. It's much more interesting than this one, but you can see that later.