Turbo Pascal on CP/M, MSX-DOS and MS-DOS

Pascal compilers for the MSX

Blaise_pascalThe Pascal language was named after  Blaise Pascal (see picture), a French mathematician who was a pioneer in computer development history. In 1641, at the age of eighteen, Pascal constructed the first arithmetical machine, arguably the first computer. He would improve upon the instrument eight years later. In 1650, Pascal left the world of geometry and physics, and shifted his focus towards religious studies, or, as Pascal wrote, to “contemplate the greatness and the misery of man.” Pascal died in Paris on August 19, 1662.

Niklaus Wirth completed development of the original Pascal programming language in 1970. He based it upon the block structured style of the Algol programming language. There were two original goals for Pascal. According to the Pascal Standard (ISO 7185), these goals were to a) make available a language suitable for teaching programming as a systematic discipline based on fundamental concepts clearly and naturally reflected by the language, and b) to define a language whose implementations could be both reliable and efficient on then-available computers.

Pascal was used in the seventies and eighties as the computer language in programming education. It served as the main programming language to teach structured programming.Many compilers were available for all current platforms these days. The language itself is a standard now (ANSI) but also served as model used by Wirth for more advanced (modular) languages such as Modula and Oberon.

Borland produced Turbo Pascal both for CP/M and MS-DOS, version 3 was a huge success and much of the software in the eighties on small computers is written with Turbo Pascal. Alas it was not standard Pascal, instead very practical adapted to the CP/M and MS-DOS environment.
Version 3 was the last version for CP/M, on the PC many versions followed (Borland Pascal 7 was the last DOS-based) and eventually evolved to Delphi (Windows) and Kylix (Linux).

Read this great introduction how to write GOOD programs!

Turbo Pascal may not be the only Pascal compiler running on MSX, it is the best supported one.

The untouched and not installed version(see the Pascal course in MCCM part 1!):
Turbo Pascal 3.01 for CP/M

A version of Turbo Pascal was distributed by Philips. In the package you find:

  • Turbo Pascal 8 bits MSX This version was a real Borland product, as you can see on the floppy label.
  • A book by Jeff Dunteman with demo disk “Turbo Pascal Compleet”,

stpfloppyManual, Front and Back CoverBelow are scanned images of the front and back covers of the Turbo Pascal 3 manual. Back in those days the manual was the product. The floppy disk placed inside the manual cover along with the license agreement, invitation to join on CompuServe forums and other paper marketing pieces. Click on each image to display a larger version of each cover.
The manual of Turbo Pascal 3.0 (MS-DOS, CP/M-86 and CP/M/MSX-DOS) is also available, thanks to Fred Kraan

tp3front tp3back Turbo Pascal 3.0 manual

A patched and installed version
MSX-2 version of Turbo Pascal 3 Made by MCE aka Frits Hilderink including the GIOS and a PC version!
This is the official distribution placed here with permission of Frits Hilderink!
Turbo Pascal 3.3f

Turbo Pascal DataBASE Toolkit 1.2 , official add-on by BorlandFor MS-DOS with debugger (handy crosscompiling!)
Turbo Pascal 3.01 for the PC Untouched (and now freeware!)
Turbo Pascal 3.02 for the PC Another Pascal compiler: Hisoft Pascal 80 Pascal development environments Turbo Pascal out of the box is not able to use the MSX facilities. Other than MSX-Basic there are no instructions to do more than text output.Luckily it is not too difficult to give access to all MSX secrets with socalled include files containing pieces of machinecode as INLINE statements.Here a rich collection of powerfull environments is given that allow you to do anything possible on a MSX with easy to write and understand Pascal programs.

Martijn Dekker, the author of the Turbo Pascal package MDL-LIB has given permission to publish the latest and greatest version 2.2 and declared it public domain.
Some of the enhancements are:
– .typ-, .var- and .con- filesbestanden (type-, variable- and constant declarations) are integrated in the .lib- files, avoids many includes.
– works with turbo Pascal 3.3See the leesmij.txt in the archive MDL-LIB v2.2

Slotman has made an IDE for Turbo Pascal 3.3 running on the PC (Windows). You can find it here in the utils section.
Included are include files for developing games in Pascal! The very funny game Snow fighters in the Our games section (throwing snowballs) is interesting for the MSX Info pages since he included the sources in Turbo Pascal.
Slotman writes: Do you program in Pascal for MSX? Are you tired of a bad IDE, waiting the code to compile on MSX, etc? So this is the solution: MSX PAD. An IDE made for Windows, so superior to MSX-Pascal that you will ask yourself HOW nobody did it before. And on top of that it comes with all my include files that I used to make breakfree!

INL Pascal library
Pascal software and library made by Carlos de Santa-Ana Garcia for INL, the TCP/IP stack made by Nestor Soriano for a.o. the MSX ethernet interface Obsonet and serial RS232 interfaces.
The library
A telnet client
A telnet server

HansO Pascal programsPascal source with examples of filter programs: while copying a text file make adjustments like stripping to 7 bits or adding/removing text.Pascal source by me of two programs:
split (makes two halves of a file) and combine (glue the two halves together again) for MSX-DOS and CP/M.CNVS and MSX12CNVI have written programs to convert the MSX graphical screen formats back and forth to the PC.

When i wrote them it was the dark age of MS-DOS, so I used Turbo Pascal and as graphical file format PCX. It still works, even under Windows 95/98.
And I finally finished MSXCNV12 to convert to screen 12 in may 1999 after working on it for 8 years!
Paintshop Pro is highly recommended to manipulate the graphics on the PC. All sources are included. All programs are freeware. MS-DOS programs!

CNVS version 2.3 : MS-DOS program to convert MSX screen 0-8 to PCX and back including sources

This 2.3 version is a recent update (june 1999), is now in English and with a cleaner syntax.

CNVS version 2.1 : old MS-DOS program to convert MSX screen 0-8 to PCX and back in dutch only.

MSX12CNV: MS-DOS program to show or convert MSX screen 12 (in full color)

MSXCNV12: MS-DOS program to show or convert PCX on the PC to MSX screen 12 (in full color)

Quickbasic program to convert RAW file (create with Paintshop PRO) to screen 12 full color by Hans Schoormans

On request: a Windows 95/98 program to convert MSX screens to and from PCX
(actually a wrap around CNVS, MSX12CNV and MSXCNV12)
CNVSW as Windows installable program. Note the readme.txt.

PCX format description the official guide how PCX is done

INDEX  MSX and MS-DOS programs to build a database of files on your floppies with Pascal sources

My MSX pascal include libraries
To write intelligent programs on MSX.  I used Turbo Pascal v3.00. To access the MSX 1 and 2 facilities I developed Pascal libraries a long time ago. Many followers copied and enhanced those libraries but here are the original: complete with tools.
In it are functions like line, box, circle, fill figure, sprite, show text on graphics and so on.
Pascal include libraries

The magazines have paid attention to this environment with many articles, collected as far as available, here.

Per Brinch Hansen

hansenBrinch Hansen was one of the pioneers of concurrent programming and operating systems (kernels). In the 1960s, Brinch Hansen worked at the Danish computer company Regnecentralen, first in the compiler group headed by Peter Naur and Jørn Jensen, and, later, as the chief architect of the RC 4000 minicomputer and its renowned operating system kernel (RC 4000 Multiprogramming System). In 1972, he wrote the first comprehensive textbook on Operating System Principles.

In 1970 his research in computer science focused on concurrent programming.  Inspired by Ole-Johan Dahl and Kristen Nygaard’s programming language Simula 67, he invented the monitor concept in 1972. In the United States, he also developed the first concurrent programming language, Concurrent Pascal, in 1975. In 1977, he wrote the first book on Concurrent Programming: The Architecture of Concurrent Programs.

Per Brinch Hansen has concentrated on simplicity. Only the essential, always ask why complications are tolerated. His book on Programming a Personal Computer, read by me in 1983, made a lasting deep impresssion on me.

Two citations from Per Brinch Hansen on simplicity and programming
– Writing is a rigorous test of simplicity: It is just not possible to write convincingly about ideas that cannot be understood.
– Programming is the art of writing essays in crystal clear prose and making them executable

Information on the work of Per Brinch Hansen:
Solo and Concurrent/Sequential Pascal
Edison system
Joyce A programming language for networks
SuperPascal
– Collected articles by Per Brinch Hansen http://brinch-hansen.net/.

Books in my library:

pbhoperating Operating System Principles
(1973, ISBN 0-13-637843-9) (scanned)
pbharchitecture The Architecture of Concurrent Programs
(1977, ISBN 0-13-044628-9)
Concurrent Pascal and Solo
Programming a Personal Computer, Per Brinch Hansen
The book describing the Edison system, design,
development,listing of programs including compiler in the Edison language,
and the interpreter/runtime written in PDP-11 Alva language.
(1983, ISBN 0-13-730267-3), the Edison system
Programming a Personal Computer, Per Brinch Hansen
OCR version (thanks Daniel Toffetti)
pbhpascalcompiler Brinch Hansen on Pascal Compilers
(1985, ISBN 0-13-083098-4) (scanned)
pbhpascalcompiler Brinch Hansen on Pascal Compilers
OCR version (thanks Daniel Toffetti)
The Search for Simplicity.
Essays on Parallel ProgrammingSee below.
(1996, ISBN 0-8186-7566-7

The Search for Simplicity. Essays on Parallel Programming.

The Cobol compiler for the Siemens 3003
Design considerations for the RC 4000 computer
The logical structure of the RC 4000 computer
The RC 4000 real-time control system at Pulawy
RC 4000 Software: Multiprogramming System (abridged)
RC 4000 Computer: Reference Manual
RC 4000 Software: Multiprogramming System (complete)
The nucleus of a multiprogramming system
An outline of a course on operating system principles
Structured multiprogramming
Shared classes
Testing a multiprogramming system
The programming language Concurrent Pascal
The Solo operating system: A Concurrent Pascal program
The Solo operating system: Processes, monitors, and classes
The programmer as a young dog
Experience with modular concurrent programming
Design principles
Network—A multiprocessor program
Distributed processes: A concurrent programming concept
Reproducible testing of monitors
A keynote address on concurrent programming
The design of Edison
Joyce—A programming language for distributed systems
A multiprocessor implementation of Joyce
The nature of parallel programming
The Joyce Language Report
The linear search rediscovered
Householder reduction of linear equations
Monitors and Concurrent Pascal: A personal history
Model programs for computational science
Parallel cellular automata
Multiple-length division revisited
SuperPascal—A publication language
Interference control in SuperPascal
Efficient parallel recursion
The all-pairs pipeline
Balancing a pipeline
Java’s insecure parallelism
The evolution of operating systems
The invention of concurrent programming

Other books:
– Studies in Computational Science: Parallel Programming Paradigms (1995, ISBN 0-13-439324-4)
– Programming for Everyone in Java (1999, ISBN 0-387-98683-9)
– Classic Operating Systems: From Batch Processing to Distributed Systems (2001, ISBN 0-387-95113-X)
– The Origin of Concurrent Programming: From Semaphores to Remote Procedure Calls (2004, ISBN 0-387-95401-5)
– A Programmer’s Story: The Life of a Computer Pioneer (2004, local copy available here at http://brinch-hansen.net/)
– Many articles in the scientific journals, many available at local copy of http://brinch-hansen.net/.


With father

Class of 1949

Age 21

Ivar Bech

Naur and Brinch Hansen

Naur, Dahl, Brinch Hansen

Compiler Group

RC4000 computer

1959

1967

1975