                                       CP/M   V2.2
                           Application Note 10, BDOS, 03/12/82
                        Booting CP/M on Drives Other Than Drive A

                          Copyright   1982 by Digital Research
                   CP/M is a registered trademark of Digital Research.
                         DDT is a trademark of Digital Research.
                                 Compiled November 1982

          Applicable products and version numbers:  CP/M   V2.2

          Module:  BDOS

               Booting CP/M on a drive other than drive A changes  the  initial
          prompt  displayed after a cold boot.  Instead of A>, you must specify
          the drive intended to follow the cold boot  in  the  following  patch
          procedure.  Also,  your  BIOS  must  pass  the intended boot drive to
          register C in the CCP upon cold boots (see the CP/M Operating  System
          Manual).  The intended boot drive in this patch procedure and in your
          BIOS is indicated by a number relative to zero.  (A=0, B=1, C=2, ...,
          P=15.)  This procedure changes the drive selected by BDOS Function 13
          (Reset Disk System).

               Use  caution  installing  this   patch   because   it   requires
          modification  to the CP/M submit processor (SUBMIT.COM).  SUBMIT must
          write the $$$.SUB file to the boot drive you specify in  this  patch.
          The  procedure  to modify SUBMIT is described in CP/M V2.2, Patch 03,
          dated 1/21/82.  Instead  of  setting  the  byte  at  5BBH  to  1,  as
          described  in Patch 03, set the byte to the specified boot drive plus
          1.  For example, if the boot drive is 1 (the B drive), then  set  the
            byte in SUBMIT.COM at 5BBH to 2.

               Place the following code in a file named CPMxx.COM (xx =  memory
          size).  Determine  the  CP/M base for your size memory and include it
          in the code.  Assemble and insert CPMxx.COM into the SYSGEN or MOVCPM
          image  exactly as you would patch in a new version of your BIOS.  Use
          the DDT   i command followed by the DDT  r  command.   Use  the  same
          offset  as your custom BIOS.  Make a back-up copy of CPMxx.COM before
          you make the changes.


                  cpmbase equ     ?
                  drive   equ     ?       ;boot drive
                                          ;0=A, 1=B, ..., 15=P

                          org     cpmbase + 0148Ch

                          jmp     cpmbase + 15EEh         ;was "xra a"

                          org     cpmbase + 15EEh
                          mvi     a,drive                 ;was "nop"
                          sta     cpmbase + 0B42h         ;was "nop"
                          jmp     cpmbase + 1490h         ;was "nop"


               Licensed users are granted the right to include these changes in
          CP/M V2.2 software.
