Did CP/M support custom hardware using device drivers?Why did CP/M and MS-DOS used the BIOS drivers instead of their own drivers to access hardware?Using the swap space of Windows 3.1 as a MS-DOS 6.2.2 temporary directorySlash versus backslash as directory separator - what/who caused this rift?Which MS-/PC-DOS version was the first to allow multiple partitions to be used?Which BASIC interpreters support techniques for hybrid programming in Assembly?How did DOS know where to load itself in upper memory?How do I create a boot menu to select between Windows and DOS?Can DOS boot to a hard drive other than HDA1?How to put a delay in AUTOEXEC.BATFiguring out size of Device Drivers and where they are loaded in High Memory

The use of "touch" and "touch on" in context

Know when to turn notes upside-down(eighth notes, sixteen notes, etc.)

How to deal with taxi scam when on vacation?

What are some nice/clever ways to introduce the tonic's dominant seventh chord?

Co-worker team leader wants to inject his friend's awful software into our development. What should I say to our common boss?

Will a pinhole camera work with instant film?

Informing my boss about nasty remarks about me from a colleague

Employee lack of ownership

Did Ender ever learn that he killed Stilson and/or Bonzo?

Brexit - No Deal Rejection

Should we release the security issues we found in our product as CVE or we can just update those on weekly release notes?

How to explain that I do not want to visit a country due to personal safety concern?

Define, (actually define) the "stability" and "energy" of a compound

Min function accepting varying number of arguments in C++17

Fantasy series where a Vietnam vet is transported to a fantasy land

Is it possible to upcast ritual spells?

How to simplify this time periods definition interface?

How to answer questions about my characters?

Ban on all campaign finance?

Software described as 香ばしい

Is it normal that my co-workers at a fitness company criticize my food choices?

Why would a flight no longer considered airworthy be redirected like this?

Why doesn't using two cd commands in bash script execute the second command?

Does this AnyDice function accurately calculate the number of ogres you make unconcious with three 4th-level castings of Sleep?



Did CP/M support custom hardware using device drivers?


Why did CP/M and MS-DOS used the BIOS drivers instead of their own drivers to access hardware?Using the swap space of Windows 3.1 as a MS-DOS 6.2.2 temporary directorySlash versus backslash as directory separator - what/who caused this rift?Which MS-/PC-DOS version was the first to allow multiple partitions to be used?Which BASIC interpreters support techniques for hybrid programming in Assembly?How did DOS know where to load itself in upper memory?How do I create a boot menu to select between Windows and DOS?Can DOS boot to a hard drive other than HDA1?How to put a delay in AUTOEXEC.BATFiguring out size of Device Drivers and where they are loaded in High Memory













9















MS DOS Ver 1.0 did not have OS support for device drivers. DOS ver2 added support for device drivers in the config.sys file during boot with the "DEVICE=[path][filename][parameters]".



  1. Did CP/M have OS support for device drivers?

  2. Did DOS ver1 leave device drivers out, or was DOS v2 device support a new advancement over CPM?









share|improve this question
























  • You could have custom device drivers in CP/M, but you'd have to recompile CP/M to use them (an approach similar to many other systems at that time). Not sure if that was the kind of "support" you had in mind.

    – dirkt
    yesterday











  • Your question sounds a bit as if you assumed that MS-DOS implemented everything like CP/M - No, it actually didn't - The user-visible concepts were somewhat aligned, like 8+3 filenames and a loadable command processor. MS-DOS did not implement a BIOS, but expected that to be supplied by the firmware. Actually, I think there were more differences than similarities.

    – tofro
    yesterday







  • 1





    @tofro The CP/M BIOS, BDOS and Console Command Processor corresponded to the MS-DOS files IO.SYS, MSDOS.SYS and COMMAND.COM (or the PC-DOS files IBMIO.SYS, IBMDOS.SYS and COMMAND.COM). Although there was another layer of system calls below the OS, still called the BIOS, MS-DOS was also available for clones without a PC BIOS, and came with a different IO.SYS. Windows 95 changed MSDOS.SYS into a text configuration file.

    – Davislor
    19 hours ago











  • @tofro MS-DOS did everythign exactly like CP/M - this includes the BIOS - here called IO.SYS. ROM BIOS was only meant to keep IO.SYS small.

    – Raffzahn
    14 hours ago















9















MS DOS Ver 1.0 did not have OS support for device drivers. DOS ver2 added support for device drivers in the config.sys file during boot with the "DEVICE=[path][filename][parameters]".



  1. Did CP/M have OS support for device drivers?

  2. Did DOS ver1 leave device drivers out, or was DOS v2 device support a new advancement over CPM?









share|improve this question
























  • You could have custom device drivers in CP/M, but you'd have to recompile CP/M to use them (an approach similar to many other systems at that time). Not sure if that was the kind of "support" you had in mind.

    – dirkt
    yesterday











  • Your question sounds a bit as if you assumed that MS-DOS implemented everything like CP/M - No, it actually didn't - The user-visible concepts were somewhat aligned, like 8+3 filenames and a loadable command processor. MS-DOS did not implement a BIOS, but expected that to be supplied by the firmware. Actually, I think there were more differences than similarities.

    – tofro
    yesterday







  • 1





    @tofro The CP/M BIOS, BDOS and Console Command Processor corresponded to the MS-DOS files IO.SYS, MSDOS.SYS and COMMAND.COM (or the PC-DOS files IBMIO.SYS, IBMDOS.SYS and COMMAND.COM). Although there was another layer of system calls below the OS, still called the BIOS, MS-DOS was also available for clones without a PC BIOS, and came with a different IO.SYS. Windows 95 changed MSDOS.SYS into a text configuration file.

    – Davislor
    19 hours ago











  • @tofro MS-DOS did everythign exactly like CP/M - this includes the BIOS - here called IO.SYS. ROM BIOS was only meant to keep IO.SYS small.

    – Raffzahn
    14 hours ago













9












9








9








MS DOS Ver 1.0 did not have OS support for device drivers. DOS ver2 added support for device drivers in the config.sys file during boot with the "DEVICE=[path][filename][parameters]".



  1. Did CP/M have OS support for device drivers?

  2. Did DOS ver1 leave device drivers out, or was DOS v2 device support a new advancement over CPM?









share|improve this question
















MS DOS Ver 1.0 did not have OS support for device drivers. DOS ver2 added support for device drivers in the config.sys file during boot with the "DEVICE=[path][filename][parameters]".



  1. Did CP/M have OS support for device drivers?

  2. Did DOS ver1 leave device drivers out, or was DOS v2 device support a new advancement over CPM?






ms-dos software-development cp-m






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 4 hours ago









Thorbjørn Ravn Andersen

31719




31719










asked yesterday









jwzumwaltjwzumwalt

2,06641639




2,06641639












  • You could have custom device drivers in CP/M, but you'd have to recompile CP/M to use them (an approach similar to many other systems at that time). Not sure if that was the kind of "support" you had in mind.

    – dirkt
    yesterday











  • Your question sounds a bit as if you assumed that MS-DOS implemented everything like CP/M - No, it actually didn't - The user-visible concepts were somewhat aligned, like 8+3 filenames and a loadable command processor. MS-DOS did not implement a BIOS, but expected that to be supplied by the firmware. Actually, I think there were more differences than similarities.

    – tofro
    yesterday







  • 1





    @tofro The CP/M BIOS, BDOS and Console Command Processor corresponded to the MS-DOS files IO.SYS, MSDOS.SYS and COMMAND.COM (or the PC-DOS files IBMIO.SYS, IBMDOS.SYS and COMMAND.COM). Although there was another layer of system calls below the OS, still called the BIOS, MS-DOS was also available for clones without a PC BIOS, and came with a different IO.SYS. Windows 95 changed MSDOS.SYS into a text configuration file.

    – Davislor
    19 hours ago











  • @tofro MS-DOS did everythign exactly like CP/M - this includes the BIOS - here called IO.SYS. ROM BIOS was only meant to keep IO.SYS small.

    – Raffzahn
    14 hours ago

















  • You could have custom device drivers in CP/M, but you'd have to recompile CP/M to use them (an approach similar to many other systems at that time). Not sure if that was the kind of "support" you had in mind.

    – dirkt
    yesterday











  • Your question sounds a bit as if you assumed that MS-DOS implemented everything like CP/M - No, it actually didn't - The user-visible concepts were somewhat aligned, like 8+3 filenames and a loadable command processor. MS-DOS did not implement a BIOS, but expected that to be supplied by the firmware. Actually, I think there were more differences than similarities.

    – tofro
    yesterday







  • 1





    @tofro The CP/M BIOS, BDOS and Console Command Processor corresponded to the MS-DOS files IO.SYS, MSDOS.SYS and COMMAND.COM (or the PC-DOS files IBMIO.SYS, IBMDOS.SYS and COMMAND.COM). Although there was another layer of system calls below the OS, still called the BIOS, MS-DOS was also available for clones without a PC BIOS, and came with a different IO.SYS. Windows 95 changed MSDOS.SYS into a text configuration file.

    – Davislor
    19 hours ago











  • @tofro MS-DOS did everythign exactly like CP/M - this includes the BIOS - here called IO.SYS. ROM BIOS was only meant to keep IO.SYS small.

    – Raffzahn
    14 hours ago
















You could have custom device drivers in CP/M, but you'd have to recompile CP/M to use them (an approach similar to many other systems at that time). Not sure if that was the kind of "support" you had in mind.

– dirkt
yesterday





You could have custom device drivers in CP/M, but you'd have to recompile CP/M to use them (an approach similar to many other systems at that time). Not sure if that was the kind of "support" you had in mind.

– dirkt
yesterday













Your question sounds a bit as if you assumed that MS-DOS implemented everything like CP/M - No, it actually didn't - The user-visible concepts were somewhat aligned, like 8+3 filenames and a loadable command processor. MS-DOS did not implement a BIOS, but expected that to be supplied by the firmware. Actually, I think there were more differences than similarities.

– tofro
yesterday






Your question sounds a bit as if you assumed that MS-DOS implemented everything like CP/M - No, it actually didn't - The user-visible concepts were somewhat aligned, like 8+3 filenames and a loadable command processor. MS-DOS did not implement a BIOS, but expected that to be supplied by the firmware. Actually, I think there were more differences than similarities.

– tofro
yesterday





1




1





@tofro The CP/M BIOS, BDOS and Console Command Processor corresponded to the MS-DOS files IO.SYS, MSDOS.SYS and COMMAND.COM (or the PC-DOS files IBMIO.SYS, IBMDOS.SYS and COMMAND.COM). Although there was another layer of system calls below the OS, still called the BIOS, MS-DOS was also available for clones without a PC BIOS, and came with a different IO.SYS. Windows 95 changed MSDOS.SYS into a text configuration file.

– Davislor
19 hours ago





@tofro The CP/M BIOS, BDOS and Console Command Processor corresponded to the MS-DOS files IO.SYS, MSDOS.SYS and COMMAND.COM (or the PC-DOS files IBMIO.SYS, IBMDOS.SYS and COMMAND.COM). Although there was another layer of system calls below the OS, still called the BIOS, MS-DOS was also available for clones without a PC BIOS, and came with a different IO.SYS. Windows 95 changed MSDOS.SYS into a text configuration file.

– Davislor
19 hours ago













@tofro MS-DOS did everythign exactly like CP/M - this includes the BIOS - here called IO.SYS. ROM BIOS was only meant to keep IO.SYS small.

– Raffzahn
14 hours ago





@tofro MS-DOS did everythign exactly like CP/M - this includes the BIOS - here called IO.SYS. ROM BIOS was only meant to keep IO.SYS small.

– Raffzahn
14 hours ago










3 Answers
3






active

oldest

votes


















21














The answer depends on the version.



CP/M 2.2 did not support any loadable device drivers. There simply was no provisioning to do that. Originally, the in-built device drivers were limited to storage, console, and serial drivers. The system vendor could extend the BIOS with new devices, but that was fixed during the system build and nothing was loadable on demand. (Some of the mechanisms described below were, however, back-ported into 2.2 and alike systems like MP/M)



CP/M 3.0 actually did support loadable system extensions (Resident System Extensions, RSX). These extensions were loaded resident into the computer and could extend the BDOS with new calls. A similar, but not identical expansion was GSX, a loadable extension to support graphical devices like terminals and printers, that itself relied on device-specific loadable drivers. These extensions implemented a standardized way of calling specific new vendor-defined system calls.



Some CP/M vendors, notably Amstrad/Sinclair (thus, Locomotive Software), implemented loadable system extensions on top of that - Amstrad/Sinclair CP/M 3.0 implemented a concept of FID (Field Installable Device drivers) that allowed extending the BIOS with support for new devices (hard disks or RAM disks, for example) without touching the original code. CP/M 3.0 for the ZX Spectrum 3 comes with a RAM disk driver as FID in source code, for example, that implements a drive M:.






share|improve this answer

























  • The GSX drivers are PRL files upload.wikimedia.org/wikipedia/commons/9/91/Cbasic.svg

    – Polluks
    23 hours ago











  • Given the lack of memory protection, it's not really true that things were not loadable on demand. One could very easily overwrite parts of the loaded operating system with new code to extend it - that may not have been widely known and common until the MS-DOS era of terminate and stay resident programs, but it was definitely possible and probably done by a few. What was missing were hooks in standard places to make linking easy. Though even those weren't entirely unheard in software of the era, for example Wordstar had a manual listing routines in the binary offered for patching.

    – Chris Stratton
    15 hours ago












  • Drats, I forgot about the RSX part :)) - Then again, CP/M 3.0 came way after DOS 1.0, didn't it?

    – Raffzahn
    14 hours ago












  • @Raffzahn yes,it did - but how does that matter?

    – tofro
    14 hours ago






  • 1





    @Raffzahn Like in "Give me a cup of coffee, but leave out the milk?". ;) But that's splitting hair. Maybe the OP wants to help us here what he intended.

    – tofro
    12 hours ago



















9















Did CPM support custom hardware using device drivers?




Yes, of course, that's what the BIOS was for.



The title is somewhat misleading, as from the question body it seems you're asking about loadable device drivers, where loadable means that drivers where loaded at startup (or later) from separate binaries and linked into the system to offer their services. Further it seems as if the question is about CP/M prior to 1981, the time MS-DOS was introduced, thus CP/M 2.2 and MP/M. Right?




Did CPM have OS support for device drivers?




  • Yes, as part of the customized BIOS.


  • No, CP/M did not have loadable device drivers (*1).


All drivers where a part of the BIOS (Assembly) code. DR supplied sample code to customize the BIOS for system builders (Buyers of a non dedicated CP/M licence).



Adding new devices worked much the same way on CP/M and MS-DOS 1.x. In both cases new devices had to fit the existing structure of BIOS calls (17 for CP/M 2.2) (*2). New devices must be compiled into the BIOS (*3)




Did DOS ver1 leave device drivers out, or was DOS v2 device support a new advancement over CPM?




Loadable drivers where newly added to MS-DOS 2.0. To some degree it was part of the step toward a unixoid system structure for DOS, like adding subdirectories even including a virtual /dev directory for devices.



Except, it never went fully that way. Much was added (including IOCTRL), but device drivers still had to fit for most parts the existing structure, which wasn't always up to task. For the CD-ROM driver this meant that it had to hook itself as a network driver (introduced with DOS 3.1) and present the disk as a remote directory assigned to a drive letter instead of simply a disk.




*1 - There's a 'yes but' part: With GSX CP/M introduced loadable device drivers, much like MS-DOS 2.0, but that's after MS-DOS was created.



*2 - Another 'but': With MP/M and later CP/M 3.0 (CPM-Plus), the Character Device Table was introduced. Here an arbitrary number of character devices could be added by system builders, using 6 character names to identify them. Assignment to the logical devices was done using the DEVICE utility and controlled by according BIOS calls.



So while for block devices system builders had to assign a hard disk number to a new device, they could use sounding names for character devices. The default table size was 12 entries for each (In/Out), enabling limited run time extension within the existing structure.



*3 - It was possible (and done) to add new devices during run time by hooking the BIOS entry table and catching/redirecting calls for a drive. Unlike MS-DOS, CP/M did not provide a TSR functionality, so everything dynamic was up to detailed system knowledge and patching.






share|improve this answer

























  • CP/M Plus uses a 16-bit word to hold character device assignments, so wouldn't be able to support more than 16 character devices at a time. There are some comments in the source code suggesting that four are reserved for intended future functionality, leaving the 12 table entries.

    – john_e
    yesterday











  • @john_e interesting. I only remembered that the character device table itself was null terminated, thus of arbitrary length.

    – Raffzahn
    14 hours ago











  • The limit of 12 is on page 54 of the CP/M 3 System Guide (§3.4.2, 'Character I/O Functions'). One hint at what may have been intended: if you manually assign physical device 15 (by setting bit 0 of the word at SCB+28h, for example), DEVICE will show this as 'File'.

    – john_e
    13 hours ago











  • @john_e You do not need to convince me any further, I do not doubt your explanation in any way. What makes you think otherwise?

    – Raffzahn
    13 hours ago












  • I didn't think you were doubting me - I just wanted to add more detail once I had my references to check.

    – john_e
    13 hours ago


















8














CPM 2.2, the most widely used and generally the progenitor of MS-DOS, supported only a few predefined devices via its BIOS.



These were:



  • console input and output

  • a listing device (printer) output

  • a punch (presumable paper tape) output

  • a reader (also paper tape) input

  • various calls to control a mass storage device (floppy disk)

and that was that.



No loadable device drivers, even though there were a few terminate and stay resident style things, I have no references for those.



Generally, memory was so tight on these old machines that nobody wanted to load anything extra.



More info on the BIOS can be found here: CPM 2.2 Alteration Guide






share|improve this answer
























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "648"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9356%2fdid-cp-m-support-custom-hardware-using-device-drivers%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    21














    The answer depends on the version.



    CP/M 2.2 did not support any loadable device drivers. There simply was no provisioning to do that. Originally, the in-built device drivers were limited to storage, console, and serial drivers. The system vendor could extend the BIOS with new devices, but that was fixed during the system build and nothing was loadable on demand. (Some of the mechanisms described below were, however, back-ported into 2.2 and alike systems like MP/M)



    CP/M 3.0 actually did support loadable system extensions (Resident System Extensions, RSX). These extensions were loaded resident into the computer and could extend the BDOS with new calls. A similar, but not identical expansion was GSX, a loadable extension to support graphical devices like terminals and printers, that itself relied on device-specific loadable drivers. These extensions implemented a standardized way of calling specific new vendor-defined system calls.



    Some CP/M vendors, notably Amstrad/Sinclair (thus, Locomotive Software), implemented loadable system extensions on top of that - Amstrad/Sinclair CP/M 3.0 implemented a concept of FID (Field Installable Device drivers) that allowed extending the BIOS with support for new devices (hard disks or RAM disks, for example) without touching the original code. CP/M 3.0 for the ZX Spectrum 3 comes with a RAM disk driver as FID in source code, for example, that implements a drive M:.






    share|improve this answer

























    • The GSX drivers are PRL files upload.wikimedia.org/wikipedia/commons/9/91/Cbasic.svg

      – Polluks
      23 hours ago











    • Given the lack of memory protection, it's not really true that things were not loadable on demand. One could very easily overwrite parts of the loaded operating system with new code to extend it - that may not have been widely known and common until the MS-DOS era of terminate and stay resident programs, but it was definitely possible and probably done by a few. What was missing were hooks in standard places to make linking easy. Though even those weren't entirely unheard in software of the era, for example Wordstar had a manual listing routines in the binary offered for patching.

      – Chris Stratton
      15 hours ago












    • Drats, I forgot about the RSX part :)) - Then again, CP/M 3.0 came way after DOS 1.0, didn't it?

      – Raffzahn
      14 hours ago












    • @Raffzahn yes,it did - but how does that matter?

      – tofro
      14 hours ago






    • 1





      @Raffzahn Like in "Give me a cup of coffee, but leave out the milk?". ;) But that's splitting hair. Maybe the OP wants to help us here what he intended.

      – tofro
      12 hours ago
















    21














    The answer depends on the version.



    CP/M 2.2 did not support any loadable device drivers. There simply was no provisioning to do that. Originally, the in-built device drivers were limited to storage, console, and serial drivers. The system vendor could extend the BIOS with new devices, but that was fixed during the system build and nothing was loadable on demand. (Some of the mechanisms described below were, however, back-ported into 2.2 and alike systems like MP/M)



    CP/M 3.0 actually did support loadable system extensions (Resident System Extensions, RSX). These extensions were loaded resident into the computer and could extend the BDOS with new calls. A similar, but not identical expansion was GSX, a loadable extension to support graphical devices like terminals and printers, that itself relied on device-specific loadable drivers. These extensions implemented a standardized way of calling specific new vendor-defined system calls.



    Some CP/M vendors, notably Amstrad/Sinclair (thus, Locomotive Software), implemented loadable system extensions on top of that - Amstrad/Sinclair CP/M 3.0 implemented a concept of FID (Field Installable Device drivers) that allowed extending the BIOS with support for new devices (hard disks or RAM disks, for example) without touching the original code. CP/M 3.0 for the ZX Spectrum 3 comes with a RAM disk driver as FID in source code, for example, that implements a drive M:.






    share|improve this answer

























    • The GSX drivers are PRL files upload.wikimedia.org/wikipedia/commons/9/91/Cbasic.svg

      – Polluks
      23 hours ago











    • Given the lack of memory protection, it's not really true that things were not loadable on demand. One could very easily overwrite parts of the loaded operating system with new code to extend it - that may not have been widely known and common until the MS-DOS era of terminate and stay resident programs, but it was definitely possible and probably done by a few. What was missing were hooks in standard places to make linking easy. Though even those weren't entirely unheard in software of the era, for example Wordstar had a manual listing routines in the binary offered for patching.

      – Chris Stratton
      15 hours ago












    • Drats, I forgot about the RSX part :)) - Then again, CP/M 3.0 came way after DOS 1.0, didn't it?

      – Raffzahn
      14 hours ago












    • @Raffzahn yes,it did - but how does that matter?

      – tofro
      14 hours ago






    • 1





      @Raffzahn Like in "Give me a cup of coffee, but leave out the milk?". ;) But that's splitting hair. Maybe the OP wants to help us here what he intended.

      – tofro
      12 hours ago














    21












    21








    21







    The answer depends on the version.



    CP/M 2.2 did not support any loadable device drivers. There simply was no provisioning to do that. Originally, the in-built device drivers were limited to storage, console, and serial drivers. The system vendor could extend the BIOS with new devices, but that was fixed during the system build and nothing was loadable on demand. (Some of the mechanisms described below were, however, back-ported into 2.2 and alike systems like MP/M)



    CP/M 3.0 actually did support loadable system extensions (Resident System Extensions, RSX). These extensions were loaded resident into the computer and could extend the BDOS with new calls. A similar, but not identical expansion was GSX, a loadable extension to support graphical devices like terminals and printers, that itself relied on device-specific loadable drivers. These extensions implemented a standardized way of calling specific new vendor-defined system calls.



    Some CP/M vendors, notably Amstrad/Sinclair (thus, Locomotive Software), implemented loadable system extensions on top of that - Amstrad/Sinclair CP/M 3.0 implemented a concept of FID (Field Installable Device drivers) that allowed extending the BIOS with support for new devices (hard disks or RAM disks, for example) without touching the original code. CP/M 3.0 for the ZX Spectrum 3 comes with a RAM disk driver as FID in source code, for example, that implements a drive M:.






    share|improve this answer















    The answer depends on the version.



    CP/M 2.2 did not support any loadable device drivers. There simply was no provisioning to do that. Originally, the in-built device drivers were limited to storage, console, and serial drivers. The system vendor could extend the BIOS with new devices, but that was fixed during the system build and nothing was loadable on demand. (Some of the mechanisms described below were, however, back-ported into 2.2 and alike systems like MP/M)



    CP/M 3.0 actually did support loadable system extensions (Resident System Extensions, RSX). These extensions were loaded resident into the computer and could extend the BDOS with new calls. A similar, but not identical expansion was GSX, a loadable extension to support graphical devices like terminals and printers, that itself relied on device-specific loadable drivers. These extensions implemented a standardized way of calling specific new vendor-defined system calls.



    Some CP/M vendors, notably Amstrad/Sinclair (thus, Locomotive Software), implemented loadable system extensions on top of that - Amstrad/Sinclair CP/M 3.0 implemented a concept of FID (Field Installable Device drivers) that allowed extending the BIOS with support for new devices (hard disks or RAM disks, for example) without touching the original code. CP/M 3.0 for the ZX Spectrum 3 comes with a RAM disk driver as FID in source code, for example, that implements a drive M:.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 5 hours ago









    John Dallman

    3,469817




    3,469817










    answered yesterday









    tofrotofro

    16.2k33391




    16.2k33391












    • The GSX drivers are PRL files upload.wikimedia.org/wikipedia/commons/9/91/Cbasic.svg

      – Polluks
      23 hours ago











    • Given the lack of memory protection, it's not really true that things were not loadable on demand. One could very easily overwrite parts of the loaded operating system with new code to extend it - that may not have been widely known and common until the MS-DOS era of terminate and stay resident programs, but it was definitely possible and probably done by a few. What was missing were hooks in standard places to make linking easy. Though even those weren't entirely unheard in software of the era, for example Wordstar had a manual listing routines in the binary offered for patching.

      – Chris Stratton
      15 hours ago












    • Drats, I forgot about the RSX part :)) - Then again, CP/M 3.0 came way after DOS 1.0, didn't it?

      – Raffzahn
      14 hours ago












    • @Raffzahn yes,it did - but how does that matter?

      – tofro
      14 hours ago






    • 1





      @Raffzahn Like in "Give me a cup of coffee, but leave out the milk?". ;) But that's splitting hair. Maybe the OP wants to help us here what he intended.

      – tofro
      12 hours ago


















    • The GSX drivers are PRL files upload.wikimedia.org/wikipedia/commons/9/91/Cbasic.svg

      – Polluks
      23 hours ago











    • Given the lack of memory protection, it's not really true that things were not loadable on demand. One could very easily overwrite parts of the loaded operating system with new code to extend it - that may not have been widely known and common until the MS-DOS era of terminate and stay resident programs, but it was definitely possible and probably done by a few. What was missing were hooks in standard places to make linking easy. Though even those weren't entirely unheard in software of the era, for example Wordstar had a manual listing routines in the binary offered for patching.

      – Chris Stratton
      15 hours ago












    • Drats, I forgot about the RSX part :)) - Then again, CP/M 3.0 came way after DOS 1.0, didn't it?

      – Raffzahn
      14 hours ago












    • @Raffzahn yes,it did - but how does that matter?

      – tofro
      14 hours ago






    • 1





      @Raffzahn Like in "Give me a cup of coffee, but leave out the milk?". ;) But that's splitting hair. Maybe the OP wants to help us here what he intended.

      – tofro
      12 hours ago

















    The GSX drivers are PRL files upload.wikimedia.org/wikipedia/commons/9/91/Cbasic.svg

    – Polluks
    23 hours ago





    The GSX drivers are PRL files upload.wikimedia.org/wikipedia/commons/9/91/Cbasic.svg

    – Polluks
    23 hours ago













    Given the lack of memory protection, it's not really true that things were not loadable on demand. One could very easily overwrite parts of the loaded operating system with new code to extend it - that may not have been widely known and common until the MS-DOS era of terminate and stay resident programs, but it was definitely possible and probably done by a few. What was missing were hooks in standard places to make linking easy. Though even those weren't entirely unheard in software of the era, for example Wordstar had a manual listing routines in the binary offered for patching.

    – Chris Stratton
    15 hours ago






    Given the lack of memory protection, it's not really true that things were not loadable on demand. One could very easily overwrite parts of the loaded operating system with new code to extend it - that may not have been widely known and common until the MS-DOS era of terminate and stay resident programs, but it was definitely possible and probably done by a few. What was missing were hooks in standard places to make linking easy. Though even those weren't entirely unheard in software of the era, for example Wordstar had a manual listing routines in the binary offered for patching.

    – Chris Stratton
    15 hours ago














    Drats, I forgot about the RSX part :)) - Then again, CP/M 3.0 came way after DOS 1.0, didn't it?

    – Raffzahn
    14 hours ago






    Drats, I forgot about the RSX part :)) - Then again, CP/M 3.0 came way after DOS 1.0, didn't it?

    – Raffzahn
    14 hours ago














    @Raffzahn yes,it did - but how does that matter?

    – tofro
    14 hours ago





    @Raffzahn yes,it did - but how does that matter?

    – tofro
    14 hours ago




    1




    1





    @Raffzahn Like in "Give me a cup of coffee, but leave out the milk?". ;) But that's splitting hair. Maybe the OP wants to help us here what he intended.

    – tofro
    12 hours ago






    @Raffzahn Like in "Give me a cup of coffee, but leave out the milk?". ;) But that's splitting hair. Maybe the OP wants to help us here what he intended.

    – tofro
    12 hours ago












    9















    Did CPM support custom hardware using device drivers?




    Yes, of course, that's what the BIOS was for.



    The title is somewhat misleading, as from the question body it seems you're asking about loadable device drivers, where loadable means that drivers where loaded at startup (or later) from separate binaries and linked into the system to offer their services. Further it seems as if the question is about CP/M prior to 1981, the time MS-DOS was introduced, thus CP/M 2.2 and MP/M. Right?




    Did CPM have OS support for device drivers?




    • Yes, as part of the customized BIOS.


    • No, CP/M did not have loadable device drivers (*1).


    All drivers where a part of the BIOS (Assembly) code. DR supplied sample code to customize the BIOS for system builders (Buyers of a non dedicated CP/M licence).



    Adding new devices worked much the same way on CP/M and MS-DOS 1.x. In both cases new devices had to fit the existing structure of BIOS calls (17 for CP/M 2.2) (*2). New devices must be compiled into the BIOS (*3)




    Did DOS ver1 leave device drivers out, or was DOS v2 device support a new advancement over CPM?




    Loadable drivers where newly added to MS-DOS 2.0. To some degree it was part of the step toward a unixoid system structure for DOS, like adding subdirectories even including a virtual /dev directory for devices.



    Except, it never went fully that way. Much was added (including IOCTRL), but device drivers still had to fit for most parts the existing structure, which wasn't always up to task. For the CD-ROM driver this meant that it had to hook itself as a network driver (introduced with DOS 3.1) and present the disk as a remote directory assigned to a drive letter instead of simply a disk.




    *1 - There's a 'yes but' part: With GSX CP/M introduced loadable device drivers, much like MS-DOS 2.0, but that's after MS-DOS was created.



    *2 - Another 'but': With MP/M and later CP/M 3.0 (CPM-Plus), the Character Device Table was introduced. Here an arbitrary number of character devices could be added by system builders, using 6 character names to identify them. Assignment to the logical devices was done using the DEVICE utility and controlled by according BIOS calls.



    So while for block devices system builders had to assign a hard disk number to a new device, they could use sounding names for character devices. The default table size was 12 entries for each (In/Out), enabling limited run time extension within the existing structure.



    *3 - It was possible (and done) to add new devices during run time by hooking the BIOS entry table and catching/redirecting calls for a drive. Unlike MS-DOS, CP/M did not provide a TSR functionality, so everything dynamic was up to detailed system knowledge and patching.






    share|improve this answer

























    • CP/M Plus uses a 16-bit word to hold character device assignments, so wouldn't be able to support more than 16 character devices at a time. There are some comments in the source code suggesting that four are reserved for intended future functionality, leaving the 12 table entries.

      – john_e
      yesterday











    • @john_e interesting. I only remembered that the character device table itself was null terminated, thus of arbitrary length.

      – Raffzahn
      14 hours ago











    • The limit of 12 is on page 54 of the CP/M 3 System Guide (§3.4.2, 'Character I/O Functions'). One hint at what may have been intended: if you manually assign physical device 15 (by setting bit 0 of the word at SCB+28h, for example), DEVICE will show this as 'File'.

      – john_e
      13 hours ago











    • @john_e You do not need to convince me any further, I do not doubt your explanation in any way. What makes you think otherwise?

      – Raffzahn
      13 hours ago












    • I didn't think you were doubting me - I just wanted to add more detail once I had my references to check.

      – john_e
      13 hours ago















    9















    Did CPM support custom hardware using device drivers?




    Yes, of course, that's what the BIOS was for.



    The title is somewhat misleading, as from the question body it seems you're asking about loadable device drivers, where loadable means that drivers where loaded at startup (or later) from separate binaries and linked into the system to offer their services. Further it seems as if the question is about CP/M prior to 1981, the time MS-DOS was introduced, thus CP/M 2.2 and MP/M. Right?




    Did CPM have OS support for device drivers?




    • Yes, as part of the customized BIOS.


    • No, CP/M did not have loadable device drivers (*1).


    All drivers where a part of the BIOS (Assembly) code. DR supplied sample code to customize the BIOS for system builders (Buyers of a non dedicated CP/M licence).



    Adding new devices worked much the same way on CP/M and MS-DOS 1.x. In both cases new devices had to fit the existing structure of BIOS calls (17 for CP/M 2.2) (*2). New devices must be compiled into the BIOS (*3)




    Did DOS ver1 leave device drivers out, or was DOS v2 device support a new advancement over CPM?




    Loadable drivers where newly added to MS-DOS 2.0. To some degree it was part of the step toward a unixoid system structure for DOS, like adding subdirectories even including a virtual /dev directory for devices.



    Except, it never went fully that way. Much was added (including IOCTRL), but device drivers still had to fit for most parts the existing structure, which wasn't always up to task. For the CD-ROM driver this meant that it had to hook itself as a network driver (introduced with DOS 3.1) and present the disk as a remote directory assigned to a drive letter instead of simply a disk.




    *1 - There's a 'yes but' part: With GSX CP/M introduced loadable device drivers, much like MS-DOS 2.0, but that's after MS-DOS was created.



    *2 - Another 'but': With MP/M and later CP/M 3.0 (CPM-Plus), the Character Device Table was introduced. Here an arbitrary number of character devices could be added by system builders, using 6 character names to identify them. Assignment to the logical devices was done using the DEVICE utility and controlled by according BIOS calls.



    So while for block devices system builders had to assign a hard disk number to a new device, they could use sounding names for character devices. The default table size was 12 entries for each (In/Out), enabling limited run time extension within the existing structure.



    *3 - It was possible (and done) to add new devices during run time by hooking the BIOS entry table and catching/redirecting calls for a drive. Unlike MS-DOS, CP/M did not provide a TSR functionality, so everything dynamic was up to detailed system knowledge and patching.






    share|improve this answer

























    • CP/M Plus uses a 16-bit word to hold character device assignments, so wouldn't be able to support more than 16 character devices at a time. There are some comments in the source code suggesting that four are reserved for intended future functionality, leaving the 12 table entries.

      – john_e
      yesterday











    • @john_e interesting. I only remembered that the character device table itself was null terminated, thus of arbitrary length.

      – Raffzahn
      14 hours ago











    • The limit of 12 is on page 54 of the CP/M 3 System Guide (§3.4.2, 'Character I/O Functions'). One hint at what may have been intended: if you manually assign physical device 15 (by setting bit 0 of the word at SCB+28h, for example), DEVICE will show this as 'File'.

      – john_e
      13 hours ago











    • @john_e You do not need to convince me any further, I do not doubt your explanation in any way. What makes you think otherwise?

      – Raffzahn
      13 hours ago












    • I didn't think you were doubting me - I just wanted to add more detail once I had my references to check.

      – john_e
      13 hours ago













    9












    9








    9








    Did CPM support custom hardware using device drivers?




    Yes, of course, that's what the BIOS was for.



    The title is somewhat misleading, as from the question body it seems you're asking about loadable device drivers, where loadable means that drivers where loaded at startup (or later) from separate binaries and linked into the system to offer their services. Further it seems as if the question is about CP/M prior to 1981, the time MS-DOS was introduced, thus CP/M 2.2 and MP/M. Right?




    Did CPM have OS support for device drivers?




    • Yes, as part of the customized BIOS.


    • No, CP/M did not have loadable device drivers (*1).


    All drivers where a part of the BIOS (Assembly) code. DR supplied sample code to customize the BIOS for system builders (Buyers of a non dedicated CP/M licence).



    Adding new devices worked much the same way on CP/M and MS-DOS 1.x. In both cases new devices had to fit the existing structure of BIOS calls (17 for CP/M 2.2) (*2). New devices must be compiled into the BIOS (*3)




    Did DOS ver1 leave device drivers out, or was DOS v2 device support a new advancement over CPM?




    Loadable drivers where newly added to MS-DOS 2.0. To some degree it was part of the step toward a unixoid system structure for DOS, like adding subdirectories even including a virtual /dev directory for devices.



    Except, it never went fully that way. Much was added (including IOCTRL), but device drivers still had to fit for most parts the existing structure, which wasn't always up to task. For the CD-ROM driver this meant that it had to hook itself as a network driver (introduced with DOS 3.1) and present the disk as a remote directory assigned to a drive letter instead of simply a disk.




    *1 - There's a 'yes but' part: With GSX CP/M introduced loadable device drivers, much like MS-DOS 2.0, but that's after MS-DOS was created.



    *2 - Another 'but': With MP/M and later CP/M 3.0 (CPM-Plus), the Character Device Table was introduced. Here an arbitrary number of character devices could be added by system builders, using 6 character names to identify them. Assignment to the logical devices was done using the DEVICE utility and controlled by according BIOS calls.



    So while for block devices system builders had to assign a hard disk number to a new device, they could use sounding names for character devices. The default table size was 12 entries for each (In/Out), enabling limited run time extension within the existing structure.



    *3 - It was possible (and done) to add new devices during run time by hooking the BIOS entry table and catching/redirecting calls for a drive. Unlike MS-DOS, CP/M did not provide a TSR functionality, so everything dynamic was up to detailed system knowledge and patching.






    share|improve this answer
















    Did CPM support custom hardware using device drivers?




    Yes, of course, that's what the BIOS was for.



    The title is somewhat misleading, as from the question body it seems you're asking about loadable device drivers, where loadable means that drivers where loaded at startup (or later) from separate binaries and linked into the system to offer their services. Further it seems as if the question is about CP/M prior to 1981, the time MS-DOS was introduced, thus CP/M 2.2 and MP/M. Right?




    Did CPM have OS support for device drivers?




    • Yes, as part of the customized BIOS.


    • No, CP/M did not have loadable device drivers (*1).


    All drivers where a part of the BIOS (Assembly) code. DR supplied sample code to customize the BIOS for system builders (Buyers of a non dedicated CP/M licence).



    Adding new devices worked much the same way on CP/M and MS-DOS 1.x. In both cases new devices had to fit the existing structure of BIOS calls (17 for CP/M 2.2) (*2). New devices must be compiled into the BIOS (*3)




    Did DOS ver1 leave device drivers out, or was DOS v2 device support a new advancement over CPM?




    Loadable drivers where newly added to MS-DOS 2.0. To some degree it was part of the step toward a unixoid system structure for DOS, like adding subdirectories even including a virtual /dev directory for devices.



    Except, it never went fully that way. Much was added (including IOCTRL), but device drivers still had to fit for most parts the existing structure, which wasn't always up to task. For the CD-ROM driver this meant that it had to hook itself as a network driver (introduced with DOS 3.1) and present the disk as a remote directory assigned to a drive letter instead of simply a disk.




    *1 - There's a 'yes but' part: With GSX CP/M introduced loadable device drivers, much like MS-DOS 2.0, but that's after MS-DOS was created.



    *2 - Another 'but': With MP/M and later CP/M 3.0 (CPM-Plus), the Character Device Table was introduced. Here an arbitrary number of character devices could be added by system builders, using 6 character names to identify them. Assignment to the logical devices was done using the DEVICE utility and controlled by according BIOS calls.



    So while for block devices system builders had to assign a hard disk number to a new device, they could use sounding names for character devices. The default table size was 12 entries for each (In/Out), enabling limited run time extension within the existing structure.



    *3 - It was possible (and done) to add new devices during run time by hooking the BIOS entry table and catching/redirecting calls for a drive. Unlike MS-DOS, CP/M did not provide a TSR functionality, so everything dynamic was up to detailed system knowledge and patching.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 11 hours ago









    LangLangC

    5321211




    5321211










    answered yesterday









    RaffzahnRaffzahn

    52.9k6126213




    52.9k6126213












    • CP/M Plus uses a 16-bit word to hold character device assignments, so wouldn't be able to support more than 16 character devices at a time. There are some comments in the source code suggesting that four are reserved for intended future functionality, leaving the 12 table entries.

      – john_e
      yesterday











    • @john_e interesting. I only remembered that the character device table itself was null terminated, thus of arbitrary length.

      – Raffzahn
      14 hours ago











    • The limit of 12 is on page 54 of the CP/M 3 System Guide (§3.4.2, 'Character I/O Functions'). One hint at what may have been intended: if you manually assign physical device 15 (by setting bit 0 of the word at SCB+28h, for example), DEVICE will show this as 'File'.

      – john_e
      13 hours ago











    • @john_e You do not need to convince me any further, I do not doubt your explanation in any way. What makes you think otherwise?

      – Raffzahn
      13 hours ago












    • I didn't think you were doubting me - I just wanted to add more detail once I had my references to check.

      – john_e
      13 hours ago

















    • CP/M Plus uses a 16-bit word to hold character device assignments, so wouldn't be able to support more than 16 character devices at a time. There are some comments in the source code suggesting that four are reserved for intended future functionality, leaving the 12 table entries.

      – john_e
      yesterday











    • @john_e interesting. I only remembered that the character device table itself was null terminated, thus of arbitrary length.

      – Raffzahn
      14 hours ago











    • The limit of 12 is on page 54 of the CP/M 3 System Guide (§3.4.2, 'Character I/O Functions'). One hint at what may have been intended: if you manually assign physical device 15 (by setting bit 0 of the word at SCB+28h, for example), DEVICE will show this as 'File'.

      – john_e
      13 hours ago











    • @john_e You do not need to convince me any further, I do not doubt your explanation in any way. What makes you think otherwise?

      – Raffzahn
      13 hours ago












    • I didn't think you were doubting me - I just wanted to add more detail once I had my references to check.

      – john_e
      13 hours ago
















    CP/M Plus uses a 16-bit word to hold character device assignments, so wouldn't be able to support more than 16 character devices at a time. There are some comments in the source code suggesting that four are reserved for intended future functionality, leaving the 12 table entries.

    – john_e
    yesterday





    CP/M Plus uses a 16-bit word to hold character device assignments, so wouldn't be able to support more than 16 character devices at a time. There are some comments in the source code suggesting that four are reserved for intended future functionality, leaving the 12 table entries.

    – john_e
    yesterday













    @john_e interesting. I only remembered that the character device table itself was null terminated, thus of arbitrary length.

    – Raffzahn
    14 hours ago





    @john_e interesting. I only remembered that the character device table itself was null terminated, thus of arbitrary length.

    – Raffzahn
    14 hours ago













    The limit of 12 is on page 54 of the CP/M 3 System Guide (§3.4.2, 'Character I/O Functions'). One hint at what may have been intended: if you manually assign physical device 15 (by setting bit 0 of the word at SCB+28h, for example), DEVICE will show this as 'File'.

    – john_e
    13 hours ago





    The limit of 12 is on page 54 of the CP/M 3 System Guide (§3.4.2, 'Character I/O Functions'). One hint at what may have been intended: if you manually assign physical device 15 (by setting bit 0 of the word at SCB+28h, for example), DEVICE will show this as 'File'.

    – john_e
    13 hours ago













    @john_e You do not need to convince me any further, I do not doubt your explanation in any way. What makes you think otherwise?

    – Raffzahn
    13 hours ago






    @john_e You do not need to convince me any further, I do not doubt your explanation in any way. What makes you think otherwise?

    – Raffzahn
    13 hours ago














    I didn't think you were doubting me - I just wanted to add more detail once I had my references to check.

    – john_e
    13 hours ago





    I didn't think you were doubting me - I just wanted to add more detail once I had my references to check.

    – john_e
    13 hours ago











    8














    CPM 2.2, the most widely used and generally the progenitor of MS-DOS, supported only a few predefined devices via its BIOS.



    These were:



    • console input and output

    • a listing device (printer) output

    • a punch (presumable paper tape) output

    • a reader (also paper tape) input

    • various calls to control a mass storage device (floppy disk)

    and that was that.



    No loadable device drivers, even though there were a few terminate and stay resident style things, I have no references for those.



    Generally, memory was so tight on these old machines that nobody wanted to load anything extra.



    More info on the BIOS can be found here: CPM 2.2 Alteration Guide






    share|improve this answer





























      8














      CPM 2.2, the most widely used and generally the progenitor of MS-DOS, supported only a few predefined devices via its BIOS.



      These were:



      • console input and output

      • a listing device (printer) output

      • a punch (presumable paper tape) output

      • a reader (also paper tape) input

      • various calls to control a mass storage device (floppy disk)

      and that was that.



      No loadable device drivers, even though there were a few terminate and stay resident style things, I have no references for those.



      Generally, memory was so tight on these old machines that nobody wanted to load anything extra.



      More info on the BIOS can be found here: CPM 2.2 Alteration Guide






      share|improve this answer



























        8












        8








        8







        CPM 2.2, the most widely used and generally the progenitor of MS-DOS, supported only a few predefined devices via its BIOS.



        These were:



        • console input and output

        • a listing device (printer) output

        • a punch (presumable paper tape) output

        • a reader (also paper tape) input

        • various calls to control a mass storage device (floppy disk)

        and that was that.



        No loadable device drivers, even though there were a few terminate and stay resident style things, I have no references for those.



        Generally, memory was so tight on these old machines that nobody wanted to load anything extra.



        More info on the BIOS can be found here: CPM 2.2 Alteration Guide






        share|improve this answer















        CPM 2.2, the most widely used and generally the progenitor of MS-DOS, supported only a few predefined devices via its BIOS.



        These were:



        • console input and output

        • a listing device (printer) output

        • a punch (presumable paper tape) output

        • a reader (also paper tape) input

        • various calls to control a mass storage device (floppy disk)

        and that was that.



        No loadable device drivers, even though there were a few terminate and stay resident style things, I have no references for those.



        Generally, memory was so tight on these old machines that nobody wanted to load anything extra.



        More info on the BIOS can be found here: CPM 2.2 Alteration Guide







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited yesterday









        manassehkatz

        3,022623




        3,022623










        answered yesterday









        Peter CamilleriPeter Camilleri

        86439




        86439



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Retrocomputing Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f9356%2fdid-cp-m-support-custom-hardware-using-device-drivers%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown