Early Digital Research CP/M Source Code
computerhistory.org
computerhistory.org
As an example Reddit's /r/retrobattlestations had their annual BASIC week[0] where they take a BASIC program and port it to a bunch of different machines. As you can see they have 11 different versions.
[0] https://www.reddit.com/r/retrobattlestations/comments/2fn1zq...
(I never used CP/M but I used to have an Acorn BBC Micro and that had the command line processing built in to the OS, in its equivalent of the BIOS, I suppose to work around this very issue. All an application needed to do was get a string from somewhere, then pass it to the appropriate OS routine. So many programs ended up effectively having the standard command processor embedded, in addition to whatever interface they might themselves support. Though obviously the user had to be careful not to do anything silly like load a new program that overwrote the running program or overwrote their data. Different times.)
There may be earlier antecedents as well.
As for Windows, in the NT line you can also refer to drives via \Devices\... when using object paths in Windows API.