Turbo Pascal on CP/M, MSX-DOS and MS-DOS (pascal.hansotten.com)

93 points by rbanffy 3 days ago

39 comments:

by yitchelle 11 minutes ago

Turbo Pascal's IDE was my first glimpse into debugging beyond strategically place print statements. It was a game changer. Imagine single stepping through your code and inspecting your variables!

by nlehuen 13 hours ago

I purchased Turbo Pascal 3 for Amstrad CPC 6128 with my pocket money back in 1989(?). That was 1000 FF back then (~275€ today) so quite a big sum for a teenager. My dad took pity on me and funded 50% of it. Best investment ever!

Learning Pascal after Locomotive Basic was night and day. And the speeeeeed! I could finally compute 320x200 Mandelbrot set renderings in reasonable amounts of time (few minutes IIRC).

I still have the disk & manual somewhere, as well as a couple related books. And for whatever reason Ctrl-K Ctrl-W still haunts my mind.

It's really mind boggling that the entire thing (CP/M + IDE + compiler + libraries) fit on one side of a 3" floppy disk (<180 kB).

by ranma42 an hour ago

I first encountered Pascal (probably Turbo Pascal) on our Amstrad CPC 464, which being bought as used item came with lots of software floppies including some CPM stuff. Lacking a manual I never really used it though. I do remember it had a really barebones textmode-only editor. :)

by pjmlp 2 hours ago

Yes, for me a few year's later I did the same with a high density floppy (1.44 MB), holding MS-DOS 3.3, TP, and a few utils.

The TP versions started with 3.0, up to 6.0, naturally later versions had to be customised to fit into the floppy.

I used to carry it around for the school computers.

However that is another level given CPC limitations.

by forinti 10 hours ago

I just looked up the price for Acornsoft ISO Pascal in 1989 and found a listing with 69 pounds, which would be 188 2026 pounds or 220 euros. It consists of 2 16KB ROMs (and a floppy version).

by wowczarek 11 hours ago

Small machines eh?

How about a Casio PB-2000C, in all its pocketable 910 kHz glory, up to 64k RAM shared between heap, stack, code and RAM filesystem. 192 x 32 LCD and a piezo buzzer. Serial and parallel ports available and a FDD. It also has a ROM card slot. And a card was developed, the only third-party ROM for this platform, by one Hans Larsson in Sweden, in the late 1980s.

A 64k ROM with:

- a mostly TP 5.5 compatible Pascal compiler, crt and friends

- inline assembly

- units, loadable libraries and all

- debugger

- full-screen editor, global search and replace, etc.

- visual file manager

- CLI with redirection and rudimentary shell scripting - variables, conditionals, arguments

While the hardware platform is somewhat available and there is a very good emulator, due to "issues", the DL-Pascal ROM is not at this time publicly available and only a chosen few have access to it. Luckily there is a preservation effort underway.

by RodgerTheGreat 9 hours ago

Sounds fascinating. Is there anywhere we can read more about this preservation effort? Does the PB-2000C have an active user community today?

by pjmlp 2 hours ago

Interesting, given the prominence of Casio calculators in Portugal to this day.

However it was always BASIC in the models we had access to.

by jshaqaw 3 days ago

Pascal will always have my heart. My first bridge outside Basic (I was stuck with a home pc so didn’t go down the assembly rabbit hole like others of my generation). Turbo Pascal’s IDE. Add it possible for a kid to learn and create in a way I never would have done if stuck with a collection of semi independent tools. for those who say just use the command line - this was 1989. DOS was not exactly today’s modern shell environment!

by bananaboy 10 hours ago

Same here! Very fond memories. I used Turbo Pascal 3.3 under CP/M on the Microbee but found it a bit hard and cumbersome to use. But when I discovered TP5 on MS-DOS I was blown away! This was coming from writing BASIC and batch files.

by SoftTalker 4 hours ago

Is it right to say that Borland basically invented the IDE? I didn't use Turbo Pascal but did have a copy of Turbo C back in the day and that was certainly the first IDE-like programming environment I can remember.

by pjmlp an hour ago

No, Xerox PARC invented the IDE, just like they did with the GUI.

https://en.wikipedia.org/wiki/Xerox_Star

https://en.wikipedia.org/wiki/Xerox_Development_Environment

IDEs go back to how Mesa (Tajo), Interlisp-D and Smalltalk work.

Here are some overview papers

"The Mesa programming environment"

https://dl.acm.org/doi/10.1145/800225.806843

Interlisp-D, you can see all on the recovery project

https://interlisp.org/

And naturally the famous Smalltalk issue on Byte,

https://archive.org/details/byte-magazine-1981-08

Turbo Pascal naturally did what was possible on home computers hardware, the iconic 3.0 version that made it take off was released in 1985.

by adrian_b 2 hours ago

Long before the term IDE was coined, there were source code editors from within which you could run the shell commands required to build a software project and you could examine their output, e.g. the error messages.

Moreover, interpreters that offered a complete interactive environment for editing, running and debugging programs, had existed for decades for languages like APL and LISP.

Nonetheless, the availability of Turbo Pascal on cheap computers has probably introduced much more people to such a programming environment than the older alternatives, which were available only on big and expensive computers, so at most they were accessible through time-sharing services in big companies or in universities.

I have used Turbo Pascal on 8080- and Z80-based computers running the CP/M operating system, before becoming able to use IBM PC compatibles, where the Microsoft and Borland C and C++ compilers were a better alternative, and it was a good progress over what I had used previously, but before that, in the university I had used a "Remote Job Entry" system which accessed by time-sharing a computer mainframe from a serial video terminal, and you could do with it everything that you could do with Turbo Pascal (for programs written in Fortran), except that its source code editor was far more awkward (it was a line-oriented text editor, where you could see the source code, but to edit a line it was extracted into a buffer at the bottom of the screen and merged back into the source code when editing it was complete).

On CP/M, Turbo Pascal was the most convenient programming environment, but for serious work, where run-time performance mattered, I was using the Microsoft Fortran compiler for CP/M, enhanced by replacing a few of the subroutines from its run-time library with optimized variants. Pascal is really much too weak for number-crunching problems, even if it may be acceptable for non-numeric problems that are not too complex (the original Pascal does not support multi-file programs, Turbo Pascal was extended in a non-standard way to support this).

by tomcam an hour ago

The Turbo Pascal programming environment was based on UCSD Pascal.

by anthk 2 days ago

Simlar language, compatible with MSDOS, CP/M and Unix:

https://t3x.org/t3x/0/index.html

by relwin 4 hours ago

I just dug up TP v3.01 from 1983. Not sure I have a working 5-1/4 floppy drive to tell if the disk is any good... Programming with TP brings back fun times!

by pjmlp 3 days ago

I guess today is Pascal's day.

This website is full of goodies for anyone that cares about history of Niklaus Wirth created languages.

by jgord 8 hours ago

Turbo Pascal is such an iconic and beloved product, they need to make a movie about it.

by jasonfarnon 5 hours ago

I dont know about TP specifically but I could see a Borland movie. It's weird remembering them as a legit msft competitor. But yeah, enough time has passed oral histories should be around.

by iberator 2 days ago

Early versions (3?) could fit an amazing editor, assembler, compiler, debugger and whole IDE in just 120kb(!!!) of disk space.

Vim looks pathetic in comparison to it...

by rbanffy 12 hours ago

Aztec-C on the Apple II had a vi editor that ran on a 64K machine, but you had to exit it before you could run the compiler.

by stevekemp 12 hours ago

I have a small collection of "curated" CP/M software, which works alongside a CP/M emulator I wrote:

https://github.com/skx/cpm-dist

The distribution of Borland's Turbo Pascal v3.01A is approximately 180k.

by spwa4 13 hours ago

Wait, you had working inline assembly in the old Turbo Pascal 3.0? I never knew.

by yardshop 13 hours ago

Absolutely! Very powerful and fun when used to do some 320x200x256 mode graphics!

https://marktheunissen.com/posts/tech/2006-06-03-denthor-of-...

by pavlov 12 hours ago

"Denthor? Now THAT's a name I've not heard in a long time..."

Man. It's kind of crazy to think that I, a Finnish 13-year-old, was reading these ASCII tutorials written by someone in South Africa in those pre-WWW days.

The good content just somehow spread across the globe. People copied these files on floppy disks and uploaded them to BBS's on 2400 bps modems, and after a few months they had been around the world.

The inefficient and expensive distribution was actually a powerful filter for content quality. Today any stupid disinformational shit goes viral around the world in two minutes.

by moosedev 8 hours ago

I read those tutorials as well! Around the same age, in '96 or '97, when I first got online, in the UK. And it might have been someone's "translation" of them into C, although I do recall reading the Pascal originals as well.

Namedropping another contemporary reference, I probably downloaded them from the Hornet Archive or a mirror.

They were a major step along the short but satisfying road to my first 3D starfield using Borland C++ (acquired via a magazine coverdisc). I felt so l33t.

by bananaboy 11 hours ago

I read the denthor tutorials back in the day! So good! I think I used to get them via email on a bbs that had an internet gateway. It was all very clunky, just a terminal account, I think it didn’t even have slirp

by yardshop 9 hours ago

I think I got that tutorial through either Compuserve, or Usenet via Delphi the information service (years before Borland Delphi). My early stepping stones to the internet!

by rzzzt 11 hours ago

Friendly reminder that PC-GPE is still online!

by bananaboy 10 hours ago

Years ago I worked with Mark Feldman who put together PC-GPE! I did a bit of a double take and fanboyed a bit when he started because I had spent so much time reading it.

by andrewshadura 12 hours ago

This was not supported in 3.0. You could however include inline machine code, pre-assembled elsewhere or by hand.

by sorokod 11 hours ago

Elsewhere like in turbo assembler

https://en.wikipedia.org/wiki/Turbo_Assembler

by yardshop 9 hours ago

Thanks for the correction. I must have been on TP5 at that point and lost track of the distinction over the years.

by aghuang 14 hours ago

Another blast from the past with these machines. Nice post!

by timonoko 4 hours ago

I wrote Pascal for 8080 in 1976 and Finnish Army even paid some money for it.

I was truly disappointed that Turbo Pascal did not copy my handy PORT-metavariable. You can write & read IO-ports without any extra hässle:

https://photos.app.goo.gl/qeJpYb94XzLBCE139

by elvis70 2 hours ago

Turbo Pascal supported port array though: https://archive.org/details/bitsavers_borlandturVersion3.0Re...

Here is the first function of your example in TP3: procedure DataOut; begin while (Port[$f5] and 1) = 0 do; port[$f4] := Data; end,

by timonoko 2 hours ago

Must be later improvement, because I whined about it in Usenet.

Originally you had to write inline assembly.

by pkphilip 5 hours ago

I wish someone will just use Claude Code and generate an equivalent of Delphi 7 for Linux, MacOSX and Windows.

by badsectoracula 3 hours ago

You don't need to wait for someone to use Claude Code for this as it already exists and existed for many years now:

https://www.lazarus-ide.org/

Data from: Hacker News, provided by Hacker News (unofficial) API