Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
ChangeDrive
 Map                                       Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
;* ChangeDrive - Changes default drive.
;*
;* Shows:   DOS Function - 0Eh (Select Disk)
;*
;* Params:  Drive - Uppercase letter designation for new drive
;*
;* Return:  None
 
ChangeDrive PROC,
        Drive:WORD
 
        mov     ah, 0Eh                 ; DOS Function 0Eh
        mov     dx, Drive               ; Drive designation in DL,
        sub     dl, 'A'                 ;   0=A, 1=B, 2=C, etc
        int     21h                     ; Select Disk
        ret
 
ChangeDrive ENDP
                                    -♦-