Settings

Theme

Ask HN: Are impressive new programs being written for CP/M?

47 points by wideareanetwork 5 years ago · 33 comments · 1 min read


If yes, what are they?

jstanley 5 years ago

I wrote a web server for CP/M a couple of years ago: https://github.com/jes/cpmhttpd and https://incoherency.co.uk/blog/stories/rc2014-web-server.htm... and a demo video https://www.youtube.com/watch?v=E3hSGMdmdxc

Since CP/M has no networking support, this also includes implementing TCP/IP inside the web server program, although I only did an extremely superficial job of this: just enough to make it look like it works under normal circumstances. (For example, it has no mechanism to retransmit dropped packets, at least partly because because my machine has no RTC so it has no idea how much time is passing).

It connects to the Internet via SLIP over a serial port to a nearby Linux machine.

It briefly hosted a little web page about my RC2014 and the web server program, but it's too much hassle to keep it running, so it's not up at the moment.

  • sloaken 5 years ago

    Wow that is really impressive. I had thought CP/M had passed away years ago.

ChuckMcM 5 years ago

Generally no, in the sense that it takes a bit to impress someone these days.

For me (when I used CP/M as a daily driver) MINCE (for MINCE is not completely EMACS :-)) was pretty damn impressive. And you have to understand that the Z80 was less powerful than an Arduino ATMega328.

So a better question is "why hasn't someone built a system out of an Arduino that can self host compilers, editors, file systems, and allows you to do code development on a serial terminal or a "PC console" like device? It is entirely doable, it won't be "quick" of course.

  • jstanley 5 years ago

    > why hasn't someone built a system out of an Arduino that can self host compilers, editors, file systems, and allows you to do code development on a serial terminal or a "PC console" like device?

    Mainly because Arduinos only have 2K of RAM. You could certainly connect up extra RAM chips to the digital I/O pins, but I'm not convinced there is any way to ask the ATmega328 to use this as extra memory, and even if there is you wouldn't have a lot of pins left over for doing anything else with.

Animats 5 years ago

Probably not. But FreeDOS lives on. Modern toolchains can compile to FreeDOS executables. FreeDOS is useful when you want a computer to run one program and nothing else. You can be confident that there's no backdoor network connection because there's no networking support in the OS.

  • csdreamer7 5 years ago

    I wonder how feasible it would be for malware to inject networking support into FreeDOS? Drivers, a TCP/IP stack, not very familiar with how DOS is constructed compared to my studies on the modern Linux kernel.

    • guerrilla 5 years ago

      I would think the hardest part would be knowing what NIC to target, otherwise it's just a matter of work.

    • slim 5 years ago

      It's trivial. There's an opensource tcp/ip stack for dos. I used to use it back in 98 to connect to the internet with my 386sx

  • sloaken 5 years ago

    The lack of network support and thus no backdoor is one of the reasons I love SQLite.

wideareanetworkOP 5 years ago

Related question:

What “new” CP/M machines can be bought today?

The closest I know is this kit:

https://rc2014.co.uk/

Any others that can be bought off the shelf today?

  • stevekemp 5 years ago

    There are quite a few single-board computers out there that appear on tindie, etc. Usually people design a board, get it up and running, sell it for a few months or years then it dies off.

    RC2014 has been quite long-lived by contrast, I guess having the various extensions/addons helps encourage people to keep tinkering with it.

    I bought a single-board Z80-based system a few months back, and I guestimate there are about 50 of those specific boards in existence - but it doesn't matter too much how many of a specific board exist, so long as the CP/M archives continue to be maintained a new design isn't so hard to create.

  • VLM 5 years ago
  • fred256 5 years ago

    There are a few others on Tindie, e.g. this one: https://www.tindie.com/products/tindiescx/sc131-pocket-sized...

nickt 5 years ago

Lighthouse of Doom from earlier this week:

https://news.ycombinator.com/item?id=26946130

  • Zilcho 5 years ago

    yes, that made me just want to run out and get one when I read that earlier. It has four rooms...

wk_end 5 years ago

OP, I’m super curious as to what inspired you to ask.

  • wideareanetworkOP 5 years ago

    I’m planning to write a text based social network for vintage computing enthusiasts, for CP/M. It’ll be written in Turbo Pascal.

    It’s my path to $2B.

    Don’t tell anyone my idea.

    • throwaway81523 5 years ago

      That sounds kind of cool, but although the binaries of Turbo Pascal are now downloadable from Borland's successor at no charge, the source code was never released. That makes the proposition less interesting than it would otherwise be. BDS C source code was released into the public domain a few years ago, so that might be an alternative. Or you could use MSDOS/FreeDOS that would give you a lot more flexibility while staying a similar text-based spirit.

    • browningstreet 5 years ago

      Great. Time to buy up a working Osborne 1, then I can be 14 all over again.

    • Zilcho 5 years ago

      Write a windows like gui for it, and follow the path dos took upwards.

  • andyjohnson0 5 years ago

    Me too. This is a supremely HN ask.

Zilcho 5 years ago

The plan is to put it on the z80 computer you built. https://archive.org/details/BuildYourOwnZ80ComputerSteveCiar...

the_only_law 5 years ago

I wouldn't imagine anything besides little personal projects by retro enthusiasts with a machine running CP/M. Speaking of which I should fine me one.

retrac 5 years ago

There are no doubt some systems still running under emulation doing the same thing as they were 40 years ago. The software might even be maintained. But the truth for decades now. CP/M is dead. Long live CP/M!

It's just hobbyists now. One hacker ported his game to a Kaypro under CP/M a couple years ago: http://www.chrisfenton.com/dd9-kaypro-edition/

Much of the focus is on porting CP/M to whatever new or old Z80 system someone has built or found. Speaking of which... CP/Mish is an attempt to bring all the free software CP/M tools together. It is to CP/M as Linux is to UNIX, or FreeDOS is to MS-DOS. A mostly complete, improved, libre reimplementation: https://github.com/davidgiven/cpmish

RunCPM is a CP/M Z80 virtual machine under modern OSes for development etc. https://github.com/MockbaTheBorg/RunCPM

In terms of recent new programs, here are some pointers if you wanted to write something yourself:

Also written by the maintainer of the CP/Mish project (and not CP/M specific) is Cowgol. Alpha quality. But it's a self-hosted Pascal/Ada-like language with compiler. Runs on 8-bit systems, at least theoretically. It is written, of course, entirely in Cowgol: https://github.com/davidgiven/cowgol

Millfork is another new language which targets CP/M systems, among others. It's a whole-program optimizing cross-compiler for a language somewhat lower level than C, with properties that make it very nice to compile for 8-bit systems like no recursion, and no automatic promotion to 16-bit integers in type handling: https://github.com/KarolS/millfork

There's some work on a Z80 target for FreePascal. I don't think there's CP/M specific support, so there's a project idea: https://wiki.freepascal.org/Z80

SDCC supports the platform with C surprisingly well. I wouldn't call it rock-solid but compared to the above toys it is an industrial quality compiler for the Z80. In fact, C seems to be the most common actual language for hobbyist and the little remaining serious Z80 development, probably ahead of assembly. If it just reads and writes the terminal and can fit in about 60 KB, then a port is probably straightforward.

zabzonk 5 years ago

Probably not, probably because the software development tools on CP/M were far inferior to those on later OSs, such as Windows, UNIX, et al. For example, I'm not aware of a C++ compiler available for CP/M, or a VCS.

Having said that, I've written a ton of software on CP/M and enjoyed doing it - at the time. I wouldn't want to do it now.

superflit 5 years ago

OP.

Are you time traveling?

That would be official only later...

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection