Comment by stevekemp

2 days ago

I grew up with the Spectrum, and wrote a CP/M emulator a while back. I'd be curious to see how complete it would get.

I struggled a lot with some complex software, which worked on some emulators and failed on others (and mine).

For example one bug I had, which is still outstanding, relates to the Hisoft C compiler:

https://github.com/skx/cpmulator/issues/250

But I see that my cpm-dist repository is referenced in the download script so that made me happy!

It's great to see people still using CP/M, writing software for it, and sharing the knowledge. Though I do think the choice to implement the CCP in C, rather than using a genuine one, is an interesting one, and a bit of a cheat. It means that you cannot use "SUBMIT" and other common-place binaries/utilities.

Knowing nothing about your code, I'd suggest checking if the code uses the DAA instruction. It is by far the trickiest thing to get right. Don't assume well behaved code -- what happens if A=0x5C and B=0xF4 and you execute "add b; daa"? That is, if you attempt to correct a sum which didn't start with valid decimal digits.

  • Interesting point, I'll take a look.

    (The z80 emulation was the only thing I didn't write myself, though it does pass the standard test-programs I've not looked at how complex/complete their testing is.)