comment /
pwd.asm--get the present working directory--returns directory path from
         root without the leading backslash
syntax:
memvar=' '
load getdrive
call getdrive with memvar

returns: capital letter of current drive

                  ******** WARNING **********
I have not tested this extensively.  No guarantees or responsibility  taken.
Russell Freeland (Synergy Corp.) 305-792-1866  5-9-86
Compuserve 76146,371
/
CODESEG SEGMENT BYTE PUBLIC 'CODE'
      assume cs:codeseg,es:codeseg

GETDRIVE PROC FAR

START:
        push    ds
        push    es
        mov     si,bx                   ;move the offset of our memvar into si
        mov     ah,19h                  ;to set up DOS function call "current disk"
        int     21h                     ;call DOS
        mov     byte ptr [bx],al        ;move it into the memvar
        add     byte ptr [bx],41H       ;convert to capital letter
        pop     es                      ;pop the regs back
        pop     ds
        ret
GETDRIVE  ENDP
CODESEG ENDS
        END  START

