Did CPM support custom hardware using device drivers?












7















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 CPM 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
    14 hours ago











  • 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
    10 hours ago








  • 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
    5 hours ago
















7















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 CPM 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
    14 hours ago











  • 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
    10 hours ago








  • 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
    5 hours ago














7












7








7








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 CPM 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 CPM 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










asked 20 hours ago









jwzumwaltjwzumwalt

2,05141638




2,05141638













  • 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
    14 hours ago











  • 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
    10 hours ago








  • 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
    5 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
    14 hours ago











  • 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
    10 hours ago








  • 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
    5 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
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
14 hours ago













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
10 hours ago







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
10 hours ago






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
5 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
5 hours ago










3 Answers
3






active

oldest

votes


















15














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, notable 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
    9 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
    1 hour ago













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

    – Raffzahn
    1 min ago





















7














Preface: I assume this question focuses on 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 is assumed the question is about CP/M prior to 1981, the time MS-DOS was introduced, thus CP/M 2.2 and MP/M.




Did CPM have OS support for device drivers?




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 unixoide 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
    10 hours ago











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

    – Raffzahn
    2 mins ago



















4














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-cpm-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









    15














    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, notable 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
      9 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
      1 hour ago













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

      – Raffzahn
      1 min ago


















    15














    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, notable 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
      9 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
      1 hour ago













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

      – Raffzahn
      1 min ago
















    15












    15








    15







    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, notable 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, notable 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

























    answered 12 hours ago









    tofrotofro

    16.1k33391




    16.1k33391













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

      – Polluks
      9 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
      1 hour ago













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

      – Raffzahn
      1 min ago





















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

      – Polluks
      9 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
      1 hour ago













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

      – Raffzahn
      1 min ago



















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

    – Polluks
    9 hours ago





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

    – Polluks
    9 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
    1 hour 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
    1 hour ago















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

    – Raffzahn
    1 min ago







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

    – Raffzahn
    1 min ago













    7














    Preface: I assume this question focuses on 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 is assumed the question is about CP/M prior to 1981, the time MS-DOS was introduced, thus CP/M 2.2 and MP/M.




    Did CPM have OS support for device drivers?




    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 unixoide 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
      10 hours ago











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

      – Raffzahn
      2 mins ago
















    7














    Preface: I assume this question focuses on 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 is assumed the question is about CP/M prior to 1981, the time MS-DOS was introduced, thus CP/M 2.2 and MP/M.




    Did CPM have OS support for device drivers?




    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 unixoide 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
      10 hours ago











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

      – Raffzahn
      2 mins ago














    7












    7








    7







    Preface: I assume this question focuses on 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 is assumed the question is about CP/M prior to 1981, the time MS-DOS was introduced, thus CP/M 2.2 and MP/M.




    Did CPM have OS support for device drivers?




    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 unixoide 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















    Preface: I assume this question focuses on 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 is assumed the question is about CP/M prior to 1981, the time MS-DOS was introduced, thus CP/M 2.2 and MP/M.




    Did CPM have OS support for device drivers?




    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 unixoide 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 13 hours ago

























    answered 13 hours ago









    RaffzahnRaffzahn

    52.9k6125213




    52.9k6125213













    • 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
      10 hours ago











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

      – Raffzahn
      2 mins 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
      10 hours ago











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

      – Raffzahn
      2 mins 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
    10 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
    10 hours ago













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

    – Raffzahn
    2 mins ago





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

    – Raffzahn
    2 mins ago











    4














    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






























      4














      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




























        4












        4








        4







        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 16 hours ago









        manassehkatz

        3,022623




        3,022623










        answered 19 hours ago









        Peter CamilleriPeter Camilleri

        82439




        82439






























            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-cpm-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







            Popular posts from this blog

            Category:香港粉麵

            List *all* the tuples!

            Channel [V]