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

(pascal.hansotten.com)

93 points | by rbanffy 3 days ago ago

37 comments

  • nlehuen 12 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).

    • pjmlp an hour 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.

    • forinti 9 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).

  • wowczarek 10 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.

    • pjmlp an hour 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.

    • RodgerTheGreat 8 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?

  • 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!

    • 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.

  • SoftTalker 3 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.

    • tomcam 2 minutes ago

      The Turbo Pascal programming environment was based on UCSD Pascal.

    • pjmlp 35 minutes 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.

    • adrian_b an hour 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).

  • anthk 2 days ago

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

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

  • relwin 3 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!

  • 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.

  • jgord 7 hours ago

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

    • jasonfarnon 4 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.

  • 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...

    • rbanffy 11 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.

    • stevekemp 11 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.

  • spwa4 12 hours ago

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

    • yardshop 12 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-...

      • 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.

        • 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.

        • bananaboy 10 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

        • yardshop 8 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!

        • rzzzt 10 hours ago

          Friendly reminder that PC-GPE is still online!

          • 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.

      • andrewshadura 11 hours ago

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

  • aghuang 13 hours ago

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

  • timonoko 3 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

  • pkphilip 4 hours ago

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