
Every program in the other courses on this site was either read out a line at a time by an interpreter, or written in the Z80's own instructions. Turbo Pascal is neither. You write in a language made for people - begin, end, Writeln('Hello') - and a compiler turns the whole program into Z80 machine code before it runs.
This course teaches that language on the Einstein, and it builds towards one thing: a puzzle game called Warehouse, in which you push crates around a walled store until every one sits on its marked square.
Pascal was designed around 1970 by Niklaus Wirth as a language for teaching programming properly: every name declared before it is used, every kind of value given a type, and a program laid out in blocks that say where they begin and end. It became one of the most widely taught languages of the 1970s and 1980s.
Turbo Pascal was Borland's version of it, and in 1983 it was a small sensation, because it put three things in one program that fitted in a home computer's memory: a menu from which you work, a screen editor in which you write, and a compiler that turns what you wrote into a program without your ever leaving it.
On the Einstein you start it by typing TURBO. It asks one question, then gives you a menu:
Logged drive: A
Work file:
Main file:
Edit Compile Run Save
eXecute Dir Quit compiler Options
Press E and you are in the editor. Type a program. Leave the editor and press R, and Turbo compiles it and runs it:
Compiling
4 lines
Code: 57 bytes (8068-80A1)
Free: 27482 bytes (80A2-EBFC)
Data: 3 bytes (EBFD-EC00)
Running
Hello, Einstein
That Code: 57 bytes is the program you wrote, turned into machine code.
And when you get something wrong - you will, constantly, everyone does - Turbo stops, says what it did not understand, and one key later puts you back in the editor with the cursor on the mistake.
When Turbo Pascal starts, it says what it is:
TURBO Pascal system Version 2.00A
CP/M-80, Z80
Copyright (C) 1983,1984 by BORLAND Inc.
This course covers version 2.00A, and only that - the one on the course disc, for machines that run CP/M on a Z80, which is what the Einstein's disc system gives it. Borland sold Turbo Pascal for many years, in many versions, for many machines, and a great deal is written about it. Almost all of it is about some other version, and a book about one is not a book about another.
If you have a Turbo Pascal disc of your own, look at the sign-on before you start. If it says 2.00A, 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 Pascal, be careful in a different way. Most of what you know will work. The places where this Pascal differs are exactly the places you will not think to check, and this course points them out as it goes.
Borland's 1984 manual for this version is on the Downloads page as Turbo Pascal Version 2.0. It is a good book, and worth having beside you. It was written for every machine Turbo ran on - CP/M machines of all sorts, and the IBM PC - so where it talks about "your terminal", or about colours and graphics, it is not talking about the Einstein. This course is.
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 it runs a disc operating system that can run CP/M programs - which is what Turbo Pascal is.
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 part is the language, in short programs you type and throw away - but from later on each section adds a piece to the game, and what you run at the end of a section is the game so far.
The game is Warehouse. A walled store, drawn in characters on the screen; some crates; some squares marked as where the crates belong; and you, a warehouse worker who can walk and push but never pull. Push every crate onto a mark and the level is done. Push one into a corner and it is stuck for good - which is where undo comes in. The levels are kept in a file on the disc, and the last pieces are a way to see where you can reach, and an editor for making levels of your own.

The finished game is on the course disc. Once S2 has you set up, type WAREHOUS at the 0: prompt and play it: the arrow keys move, U takes a move back, and Q stops. That is where the course is going.
It is the kind of puzzle Hiroyuki Imabayashi published in 1982 as Sokoban - "warehouse keeper". It suits Pascal almost exactly: the tiles are a type of their own, a level is a record, the levels live in a file, and undo is a list the program builds as you play.
The pieces come in the order you need them. The first part of the course is the language itself: the menu and the editor, keeping your work, numbers and words, decisions, repetition, your own procedures and functions, your own types, sets, arrays, records, files and pointers. The second part is the screen and the keyboard: putting text where you want it, reading a key the moment it is pressed, chance. The third part is the game, one piece a section. Then you read a real program that Borland wrote in 1984 - MicroCalc, a small spreadsheet whose whole source is on the course 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 Einstein's keyboard and Turbo's editor have a few surprises, and they are all in the first four sections.
Three things, all free: the MAME emulator, the Einstein's ROM image, and the Turbo Pascal course disc from the Downloads page. S2 installs them, on macOS, Windows or Linux, and finishes with Turbo Pascal running in front of you.
The course disc carries Turbo Pascal, the finished game, the complete source of MicroCalc, and 80K of room for your own work.
If you have a real Einstein, 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 Turbo Pascal showing its menu on your own machine.