I'm finding myself using Pascal for fun these days due to resource constraints.
The old release of Borland's Turbo Pascal, version 3.00A, runs under CP/M and provides an editor, compiler, and libraries all under 64k.
It's fast enough to use interactively, and produces code that is good-enough to implement low-level utilities, simple games, and other random hacks.
I've not used Pascal on anything larger, or more modern, but I have to say that my recent experience has been rewarding enough that I wouldn't rule it out!
Turbo Pascal and later Delphi were the first time when a programming language really spoke to me. Eventually, I went the C and C++ route, but I’ve always had a desire to return to more expressive languages.
I had no idea that there was still a modern Pascal implementation, so I may just have to get reacquainted with my first love.
I’ve also a had an early acquaintance with Borland TP 7.0 at the time C99 was already around, and Pascal felt rather clumsy in comparison. The strong typing, the lack of a preprocessor, the verbosity in data declarations, the small set of available libraries just made my early programming self consider C superior.
Check out Free Pascal (FP) if you haven't already. It supports many platforms.
You can check on their site if it supports CP/M if you need that.
I would not be surprised if it did.
The TUI IDE is very similar to Turbo Pascal, and lightning fast. The language has a lot more (advanced) features than Turbo Pascal, but you don't have to use them if you don't want to.
The generated binaries were also very small, similar to C, when I did a quick test of it on Windows, some time ago. Under 50 or 60 KB for a simple hello world program.
Sadly it seems not to be available for such systems.
Though for reference compiling my sample "Hello World" script on TP gives me a "hello.com" file which is 8320 bytes. 64k is as much memory as I have on the machine, so if it were 50-60k I'd be worried there would be no space left for anything else!
Free Pascal has support for Z80 which might work with some CP/M systems (AFAIK Z80 is backwards compatible with 8080 and some CP/M systems used Z80). You need to compile the compiler from source but it apparently can target the ZX Spectrum, so with some modification it might be able to target CP/M too.
Oh yeah, I realised that just after hitting submit. Had worked on almost as low powered machines a while, much earlier, as a hobby. Sorry for leading you down the wrong track.
It looks like the broad cross-platform capabilities of FP are mainly for modern machines and platforms, even if low powered like the RPi.
Oh Pascal!, oh the nostalgia. I saved up the princely sum of $80-$100 back in TRS-80 Model III days to buy the Pascal 80 package, the New Classics version, which was basically a proto-IDE, and a pretty sweet one at the time. http://www.trs-80.org/pascal-80/
I recall it being a huge step up from the M-III BASIC dev environment and the games and utilities I wrote ran well enough in the 48K of RAM that was available. I wonder what became of the Pascal-80 codebase? Not that it would be any better than the modern tools available for retro hardware, probably far worse. Oh yeah, "Oh Pascal!" was the book from which I learned the language, and I doubt there were many other options, as this predated Pascal's commercial use by quite a few years.
I was interested to revisit the book, but when I tried, it says:
DOWNLOAD OPTIONS
download 1 file
ENCRYPTED ADOBE PDF download
High Quality Page Images
In order to access your downloaded book you will need LCP-compliant or Adobe-compliant software on your device. The Internet Archive will administer this loan, but Adobe may also collect some information.
"Oh Pascal!" was a fantastic book, both for the content (going from beginner to a bit intermediate (1), in a single, not too thick book) and for the fun and engaging writing style, and with very good production values too, meaning the book's appearance.
IIRC, it was written by one or two US postgraduate college students or professors. My uncle, who was himself a college professor in the States, brought it for me on one of his visits to us, as a present, because he knew I was learning computers.
And during that visit, I wrote a small scientific program for him in Turbo Pascal, to use in his lab.
(1) Why I said "a bit intermediate" is because it had, near the end of the book, a program to do text concordances, and maybe one or two other non-trivial ones too.
The old release of Borland's Turbo Pascal, version 3.00A, runs under CP/M and provides an editor, compiler, and libraries all under 64k.
It's fast enough to use interactively, and produces code that is good-enough to implement low-level utilities, simple games, and other random hacks.
I've not used Pascal on anything larger, or more modern, but I have to say that my recent experience has been rewarding enough that I wouldn't rule it out!