
Every Tatung Einstein came with a BASIC on its System Master disc, and BASIC is what most of the people who owned one actually wrote. It is the language the machine was meant to be met through: you switch on, type XBAS, and within a few seconds you can ask it a sum and get an answer.
This course teaches that BASIC, and it builds towards one thing: a small game, in which a mouse jumps between platforms to reach its hole while cats patrol. By the time you have written it you will have used the screen, the sprites, the sound chip and the keyboard, and you will have written a program of a size that needs organising - which is where most of what is worth knowing about programming lives.
BASIC was designed in the 1960s at Dartmouth College as a language for people who were not going to become programmers, and by the early 1980s nearly every home computer had one built in. They were all called BASIC and they were all different, in ways that matter exactly when you sit down to type.
The Einstein's is Xtal BASIC, from Crystal Research of Torquay - "Xtal" is how engineers write "crystal". Tatung's 1984 manual for it says their version 4 was built on Crystal's Xtal BASIC 3.0 and extended for the Einstein, with sprites, a programmable sound chip and disc files among the additions.
Two ideas do most of the work in any BASIC, and this one is no exception.
The first is that a line is either done now or kept for later. Type PRINT 7-2 and the answer, 5, comes straight back. Type 10 PRINT 7-2 and nothing happens - the line has been stored, as line 10 of a program, and it waits until you type RUN. A program is a list of numbered lines, and the numbers say what order they run in.
The second is that the machine answers every line. Ready when it has done what you said; Syntax Error when it could not make sense of it. You are never left wondering.
When Xtal BASIC starts it says what it is:
TATUNG/Xtal BASIC 4.2 (C) 1983 1984
Size: 43324
Ready
This course covers version 4.2, and only that - the one on the Einstein System Master and on the course disc. Xtal BASIC existed in other versions, for the Einstein and for other machines, and a manual for one is not a manual for another. Everything in this course - every listing and every result it describes - is about 4.2.
If you have a BASIC disc of your own, look at the sign-on before you start. If it says 4.2, you are on the same ground as the course. If it says anything else, follow along by all means, but expect differences, and where you find one, believe your machine rather than this course.
If you already know a BASIC from another machine, be careful in a different way. The keywords will look familiar and most will do what you expect. The ones that do not are the ones that will cost you an afternoon, and this course points them out as it goes.
The Tatung Einstein is a British computer, built around the Zilog Z80 processor and sold from 1984. It came with a disc drive built in at a time when most home computers loaded from cassette, and its BASIC leans on that: your programs are kept in files on the disc, saved and loaded by name.
You do not need to own one. The course runs on an emulator.
This course builds one program. Not from the first page - the first half is the language, in short programs you type and throw away - but from the middle onwards each section adds a piece to the game, and the listing you run at the end of a section is the game so far.
The game is deliberately small. One screen. A mouse you move and jump with the keys. A few platforms, a hole to reach at the top, and cats walking the platforms that send you back to the start if they touch you. Small enough to read in one sitting when it is finished; big enough that writing it teaches you how a real program is put together.
The pieces come in the order you need them. The first part of the course is the language itself: typing a program in, correcting it, keeping it on disc, numbers and words, decisions, repetition and chance. The second part is the screen: colour, drawing, reading a pixel back, designing a character, and sprites. The third part is the game, one piece a section: the playing field, the mouse, gravity, the cats, being caught, getting home, sound, and making it run faster. Then you read a real program that a Tatung programmer wrote in 1984, which is on the disc, and find you can follow it.
Nothing.
You do not need to have programmed before. Everything is explained as it comes up, in the order you need it, and nothing is used before it has been explained.
If you have programmed before, the first sections will go quickly. Read them anyway: the places where this BASIC differs from the one you know are in them, and they are not where you would guess.
Three things, all free: the MAME emulator, the Einstein's ROM image, and the Xtal BASIC course disc from the Downloads page. S2 installs them, on macOS, Windows or Linux, and finishes with BASIC running in front of you.
The course disc carries BASIC, nine programs Tatung shipped with the machine in 1984, the finished game, Xtal's compiler for BASIC, and 64K of room for your own work.
If you have a real Einstein, its System Master has this BASIC on it and you are very welcome to follow along. The course is written and checked against the emulator, so where the two differ you will be ahead of us, and we would like to hear about it. S2 begins with what is different for you.
Every section has the same shape.
All three are worth a message, and the last one most of all. Nothing in this course has yet been tried on a real Einstein.
S2, Setting Up - the emulator, the ROM and the disc, and Xtal BASIC saying Ready on your own machine.