Did the Amstrad CP/M plus for PCW fully align with DR CP/M 3.0?

Started by cj7hawk, 15:03, 25 December 22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cj7hawk

Hi All ( And especially John if you see this )

Did the Amstrad CP/M fully align with DR CP/M?

Reason I'm asking is that I'm noticing that the BDOS gives up a lot of errors that break out of the program code and crash back to the CCP, via JP 0 I assume.

Did CP/M 3 have a lot of error traps and return by zero compared to CP/M 2.2?

Thanks
David

JohnElliott

CP/M 3 has more checks for wrong behaviour as opposed to CP/M 2. For example, if you try to create a file that already exists, CP/M 2 will let you (and you end up with two files in the directory with the same name). If you try to do the same thing under CP/M 3, the program is terminated with a 'File exists' error. CP/M 3 will similarly terminate a program that tries to access a password-protected file without providing the right password. Other errors (such as trying to select a drive with no disk) will dump you back to the CCP under both CP/M 2 and 3.

A program that's aware of CP/M 3 can use the F_ERRMODE function to make CP/M return errors to the program rather than dumping the user back at the CCP. The program would naturally then be expected to cope with the error situation (prompting to delete the file that shouldn't be there, requesting a password for the protected file, and so on).

cj7hawk

Thanks John, that confirms what I was thinking - Did that behaviour ever get transferred back to any 2.2 revisions ( eg, failing on errors ) and was there ever a complete list of the error traps outside of the per-call details in the documentation?

Also, do you know if Amstrad adapted CP/M to the PCW, or did they rewrite it for z80 and build a new compatible version?

Thanks
David

JohnElliott

I don't think anyone has compiled a list of checks, but now that the BDOS source has been released it's probably not too hard to search it for jumps to the error handlers that would display the messages.

Amstrad incorporated Digital Research's CP/M code for the 8080 unaltered (*) -- there was no attempt to rewrite the BDOS, CCP or the standard utilities.


(*) Except that SID was modified to use RST 30h rather than RST 38h for a debug break, a common patch on Z80 systems.

Powered by SMFPacks Menu Editor Mod