2 ms·
The article is slightly misleading about the usage of the forward slash in CP/M. It is true that the CP/M operating system itself did not use the forward slash
by adrian_b 5y ago
The article is slightly misleading about the usage of the forward slash in CP/M.
It is true that the CP/M operating system itself did not use the forward slash, but the only reason for that was that the operating system included only a handful of executable programs, the main being the equivalents of the later "COMMAND.COM", "DEBUG.COM" and "COPY.COM" of Microsoft.
The very few executable programs provided with the OS did not have any command-line options. A few of the most common file operations were shell built-ins, not separate executable programs.
On the other hand, most CP/M executable programs (which were bought from third parties, not from Digital Research, the vendor of CP/M) had command-line options and, without exceptions, they used the forward slash for command-line options, instead of the hyphen used by UNIX.
It would have been absolutely impossible to use CP/M without being aware of the convention that the forward slash is used for the command-line options.
The article is completely correct that the use of the forward slash for options was not introduced by CP/M, but it was taken from the operating systems of the DEC Corp., which, during the seventies, were much more widely used than UNIX, which was an alternative for them only on PDP-11, and it was not yet used much outside the Bell Labs.
Nevertheless, all the programs ported to MS-DOS 1.0 (e.g. MS BASIC, Turbo Pascal, WordStar, dBASE and so on) had not been ported from programs written for DEC OSes, but from programs written for CP/M.
There is no doubt that the forward slash of MS-DOS 1.0 is directly inherited from CP/M. It was used by the same programs, for exactly the same options, so they must have kept the command-line parser without changes. I have used many of the same programs both first for CP/M and then for MS-DOS, so I can be certain about this.
I have also used the DEC RSX-11M operating system on PDP-11, and indeed the RSX-11M utilities, for example PIP (Peripheral Interchange Program, a file transfer program with many options, somewhat like UNIX dd), used the forward slash many years before CP/M and most programmers for CP/M should have been familiar with this convention, so they have reused it, but the relationship from DEC OSes to MS-DOS 1.0 is indirect, via CP/M.
- pwdisswordfish9 5y agoThere is no COPY.COM.
- tasty_freeze 5y agoIf you are wondering why this comment is downvoted, DOS 1.0 certainly did have COPY.COM. I suspect the commenter misread the 2nd paragraph and thought the three programs mentioned were CP/M program names.
- pwdisswordfish9 5y agoNope: https://github.com/microsoft/MS-DOS/blob/04a3d20ff411409ab98474892b2bb1713bde0f7f/v1.25/source/COMMAND.ASM#L195-L196 https://github.com/microsoft/MS-DOS/blob/04a3d20ff411409ab98...
- lmilcin 5y agoYou meant NOSMOKE.COM? http://www.lachances.com/Humor/NoSmoke.html http://www.lachances.com/Humor/NoSmoke.html
- skissane 5y ago> The very few executable programs provided with the OS did not have any command-line options PIP was part of CP/M – it was an external executable rather than a command processor builtin, what in MS-DOS terminology is called an "external command", in CP/M terminology a "transient command" – and PIP did have command line options. It didn't use either hyphen or forward slash, instead it put switches (which it called "parameters") in square brackets, for example: PIP LPT:=X.ASM[NT8U] Prints the X.ASM file on the LPT: device (line printer). Option "N" means line add line numbers, "T8" means expand tabs at every 8th position, and "U" means convert lowercase to uppercase. [0] This is different syntax from DEC operating systems, such as RSX-11M [1] or OS/8 [2], where PIP indeed used slash as an option character. This "switches in square brackets" convention was used by other commands as well, for example the LINK linker [3]. This convention is (obviously to me) influenced by the IBM CMS mainframe operating system, [4] albeit with the parentheses of CMS replaced by square brackets. We know Gary Kildall used CMS at the Naval Postgraduate School, and it also (I'd say) influenced CP/M's use of drive letters A-Z (as in CMS file modes) instead of the multi-character disk device names generally used by DEC operating systems. Square brackets is CP/M's native convention for command line switches. Forward slash is something not native to CP/M, but a convention spread by certain ISVs. I think the linked blog post is likely right that Microsoft introduced this convention in its products, and I'd say it likely spread to other ISVs due to the widespread adoption of Microsoft's development tools. The fact that many larger ISVs used DEC minicomputers as a cross-development platform, not just Microsoft, was likely also a factor. While IBM mainframes influenced Kildall personally, and through him CP/M, IBM mainframes were much less likely to be used by CP/M ISVs than DEC minicomputers, because they were a lot more expensive. [0] http://www.tramm.li/i8080/cpm22-m.pdf http://www.tramm.li/i8080/cpm22-m.pdf page 1-33 (PDF page 40) [1] http://www.bitsavers.org/www.computer.museum.uq.edu.au/RSX/AA-L763B-TC%20Introduction%20to%20RSX-11M.pdf http://www.bitsavers.org/www.computer.museum.uq.edu.au/RSX/A... page 5-2 (PDF page 70) [2] https://www.grc.com/pdp-8/docs/OS8_System_Reference_Manual.pdf https://www.grc.com/pdp-8/docs/OS8_System_Reference_Manual.p... page 65 (PDF page 73) [3] http://bitsavers.org/pdf/digitalResearch/cpm_plus/CPM-Plus_Users_Guide_Prelim_Nov82.pdf http://bitsavers.org/pdf/digitalResearch/cpm_plus/CPM-Plus_U... page 83 (PDF page 96) [4] see for example https://www-40.ibm.com/servers/resourcelink/svc0302a.nsf/pages/zVMV7R1sc246260/$file/dmsb4_v7r1.pdf https://www-40.ibm.com/servers/resourcelink/svc0302a.nsf/pag... page 42 (PDF page 66)