3 ms·
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 b
by fuzztester 3y ago
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.
- stevekemp 3y agoSadly 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!
- fuzztester 3y agoOh 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.
- badsectoracula 3y agoFree 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.
- mrlonglong 3y agoUse optimisation to get the binary down to 1k. I did just that yesterday.
- kragen 3y ago'under 60 kb' for a cp/m machine is like 'under 60 gb' for the laptop you're probably using