CP/M was blessed with many programming languages, each with their own strengths and weaknesses. I think that Turbo Pascal stands out from these and I'm not alone. When Turbo Pascal was released in 1983 by Borland, as their first software development application, it was quickly adopted by schools, universities, hobbyists and professional software developers. Turbo Pascal combined ease of use, power, speed and a great manual all for the really low price of $49.95.
With TP you get an Integrated Development Environment (IDE), so that you can edit, compile and run all from the same application. Since the IDE is only 34Kb there is plenty of space left on a disk for your source code and compiled programs. This is particularly handy for single disk machines. The editor is very functional and uses a subset of the Wordstar key combinations.
Pascal was designed to be easy to compile and because TP uses a single pass compiler, compilation speed is incredibly quick. The downside of the compilation speed is that the code is quite a literal translation without much optimization. However, for many applications this won't be much of an issue compared to the increased programmer productivity.
If you need parts of your program to run faster, you can always embed inline machine code into functions/procedures or access functions in external binaries. The latter option allows you to create libraries in assembly language and use a jump table to access individual functions with the external keyword.
In 1986 Borland released Turbo Pascal 3.0 which added support for overlays. The running code could now be swapped in and out from disk as needed. With careful planning, you could escape the normal 64Kb limit and only be constrained by the capacity of the disk you are running the application from.
The standard library offers a good range of functions and TP keeps quite close to Standard Pascal as defined by Jensen & Wirth in their 'User Manual and Report'. As with all Pascal implementations, there are problems porting programs between implementations. However, if you aren't using any of the operating system specific calls, then you can easily port to the MS-DOS and CP/M-86 versions. My only gripe is that TP doesn't support procedures and functions passed as parameters.
Finally, Borland included a highly readable and very complete manual. It covered not just the IDE, language and libraries, but also detailed information on the memory layout and calling conventions from assembly language. This meant that you could quickly get up and running with few additional resources.
Put at least TINST.* and TURBO.* files onto a disk. The real advantage of not copying all the files is seen if you only have a single drive. The extra room will allow you to edit, compile and run your programs all from the same disk. For instructions on how to create a virtual disk for z80pack look at: Emulating a CP/M System With z80pack.
Press S for Screen Installation and select the appropriate terminal for your set up. I'm using z80pack, so I select ANSI. You probably don't want to alter this definition so say No to altering it. Then enter the speed in Mhz of your machine. If a suitable terminal isn't listed consult the TP manual for advice.
If you want to configure additional editor commands, you can do this via the Command Installation option. At the very least, if you have them, you'll probably want to configure the page-up, page-down keys as well as the cursor keys to represent character-left, character-right, line-up and line-down. If not press Q to quit.
You should now be looking at the Turbo Pascal splash screen, showing the version, copyright message and which terminal is configured. At the bottom you are asked whether to 'Include error messages'. For the moment press Y.
To work with a pascal source file, first press W and then enter a filename. This is the file that the editor will open and it is also the file that the compiler will compile if you haven't selected a main file.
Get the Turbo Pascal 3.0 Manual for CP/M-80, CP/M-86 and PC-DOS/MS-DOS from bitsavers.org. It is a wonderfully well-laid out manual and you should have no problems using this to learn and get the most out of Turbo Pascal. You may also want to take a look at a copy of the old Borland musuem page: Antique Software: Turbo Pascal v3.02.
Are there any efforts to rewrite the Turbo Pascal / C class of compiler / IDEs in Rust ? I'm mainly curious what a modern port of those TUIs would be like (and how blazingly fast they would be on modern hardware).
I have skipped a few years without any programming, and C is still C. Rust is more difficult, but the biggest change, to me, is the distance between the programmer and the computer. MS/DOS was single user, almost single task, with direct access to the OS, the BIOS and the hardware.
I can imagine a modern compiler for a modern *nix type or NT type O/S has a lot more work to do. I am absolutely no expert, so maybe this is nonsense, but I really think it will be hard to make a fair comparison between then and now.
However there are a lot of command line and TUI advocates who suggest using vim as the editor and installing various plugins to support Rust syntax highlighting, the rust-analyser, debuggers, all sorts of things. That would get you the fast text based TUI experience.
The attraction to Turbo Pascal/C was a lot to do with the speed of the compiler never mind the IDE. The pascal language in particular is amenable to fast compilation. No TUI IDE is going to help get Rust compiling faster.
Some programming courses would teach you the whole thing, proper software engineering including how multi-pass compilers & linkers worked, etc. However, often programming was and add-on to another science or engineering course and there all that really mattered was you know the basic concepts (such as variables, loops, if/branching, function/sub-routine, etc) and there was not the time to cover how and what a .EXE was compared to .COM and the odd vagaries of 8086 memory segmentation and resulting memory models (how and why 64k blocks, or bigger, might be used for code and/or data).
Yeah, I started my Computer Science degree in 1994, and the first 2 or 3 courses used Turbo Pascal, covering compiling and linking as well as coding. I still have all my binaries from those classes, lol.
I sort of wandered in sideways from all of that after starting with programming on an PSION Organiser II where the programming language was a bit of a blend of Basic and Pascal, including the need for 'compiling' it to an interim code, and a bit of machine code hacking to make OPL (Organiser Programming Language - from the days of naming things as they were - take that, Microsoft Entrails, sorry, Entra) do things that weren't in the manual - and yes, I did that manually, I only learned about assembler later - I was just making things work the way *I* wanted them to work :) ).
I was already using Borland's Paradox DB and its language PAL (Paradox Appliction Language ) as I didn't get on with DBASE and I needed to write some glue code to translate reports dumped from the VAX into something that Paradox could import as its reporting was far more slick and simpler to set up than I ever hoped to cobble together. Enter Turbo Pascal, and after some buffer tweaking it munched through the reports so quickly I executed it twice as I thought it had not run (checking the output would have been the smart move, but it surprised me). The joy of simple text files..
Borland, like IBM at the time, embarrassed Microsoft multiple times by not only making more usable interfaces but also showing that Microsoft's compilers were hopelessly inefficient - both Borland and IBM recompiled Windows and produced more compact and far faster executing code and also faster executing software in general, so obviously both had to go.
If you wonder what a lack of competition brings, just look at the resources Windows 11 needs, and the UX of Microsoft applications in general. They only break new ground in the sense that they ought to be buried.
If you wanted basic, you got one of the macs and whatever version of BASIC it had. However, most people tended to just screw around with making goofy icons in Resedit and breaking things (or playing Nettrek with other classmates...)
Wirths interests and research were in the area of "language design", and Pascal was his example of "An optimum programming language, from first principles". On the other side, Kernighan thought that c had "a useful implementation, particularly for putting unix on new processors"
They both were right. Modern implementations of Pascal languages are more useful, modern designs of c compilers are Pascal-like, and subsequent changes to the language were to make it more Pascal-like.
My 1981-1984 degree was primarily based around Pascal, at Imperial College, London, but it was too early for Turbo Pascal of course, we used an IBM 4331 running VM and it suffered when too many people used it at the same time. Of course we used other languages as well, but primarily Pascal for teaching.
As for why it wasn't use commercially, the short answer is performance. Compared to the other languages at the time (BASIC, Fortran, Lisp, C, Forth, and a few others), Pascal was extremely inefficient. It was great to teach concepts, but doing type-safe checking in the compiler, rather than relying on the developer to do it, resulted in lots of processor time spent on bounds checking and other things that the other language compilers simply didn't do.
In an education setting, performance is less important that the ability to teach the concepts. In industry, the reverse is true. I did some timing tests once of an application that had been written (very elegantly, I might add) in Microsoft Pascal for the PC, to a hacked version that had been written in Microsoft C (this was at the time when Microsoft C was just rebranded Lattice C). The Pascal code was much easier to follow, the logic flow was cleaner, and it would have been a lot easier to maintain than the C version, which was doing address arithmetic and never checking array bounds. However, the Pascal version required 50% more memory to run (at a time when memory was very expensive) and was about 30% slower.
c80f0f1006