home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / diskutil / addrive.bat < prev    next >
DOS Batch File  |  1994-03-04  |  2KB  |  51 lines

  1. Date: Mon, 01 Dec 86 12:30:24 CST
  2. From:  CCRJW%UMCVMB.BITNET@WISCVM.WISC.EDU  (Richard Winkel     UMC
  3.   Computing Services)
  4. To:  INFO-IBMPC@USC-ISIC.ARPA
  5. Subject: Program submission
  6.  
  7. ADDRIVE.BAT:
  8. rem This .BAT file will create ADDRIVE.COM.  ADDRIVE is used with the
  9. rem SUPERDRIVE ramdisk from AST.  Normally, you must open the system
  10. rem unit and reset switches on the motherboard to use SUPERDRIVE.
  11. rem ADDRIVE resets the 'switches' in RAM, so no hardware switching is
  12. rem required.  The initial run of ADDRIVE will cause the system to
  13. rem reboot, so addrive should be the first command in your autoexec.
  14. rem Example: ADDRIVE C:
  15. rem          SUPERDRV C:/M=180
  16. rem
  17. debug addrive.com <addrive.bat
  18. goto end
  19. a 100
  20. MOV   AL,[005C]                ; get first byte of fcb1
  21. OR    AL,AL                    ; was a drive specified?
  22. JZ    010B                     ; no, print msg & exit
  23. CMP   AL,04                    ; is it <= D: ?
  24. JBE   0114                     ; if so, process it
  25. MOV   DX,0136                  ; else print msg & exit
  26. MOV   AH,09                    ; print msg
  27. INT   21
  28. INT   20                       ; exit
  29. DEC   AL                       ; dec drive number
  30. MOV   CL,06                    ; shift it left 6 bits
  31. SHL   AL,CL
  32. XOR   DX,DX                    ; get to the bottom of memory
  33. MOV   DS,DX
  34. MOV   AH,[0410]                ; get equipment flag
  35. AND   AH,C0                    ; isolate relevant bits
  36. CMP   AH,AL                    ; is this drive already defined?
  37. JB    012B                     ; if not, then define it
  38. INT   20                       ; else exit
  39. AND   BYTE PTR [0410],3F       ; reset 'switches'
  40. OR    [0410],AL
  41. INT   19                       ; and reboot
  42.  
  43. e 136 'You must supply a drive specifier.$'
  44. rcx
  45. 60
  46. w
  47. q
  48. :end
  49.  
  50. [ADDRIVE.BAT has been added to the Info-IBMPC Library. -rag]
  51.