INT 21h AH=3Bh sets the current directory: CD (CHDIR) at the prompt. A relative path starts from the current directory, a path starting with "\" from the root, and ".." means the parent:

PathResult
SUBinto SUB, below the current directory
..up one level
\the root of the current drive
\TOOLS\BINan absolute path on the current drive
D:\GAMESthe current directory of D:; the current drive does not change

The drive in the path does not become the current drive; that takes INT 21h AH=0Eh. This is why CD D:\GAMES at a C:\> prompt leaves you on C:. To go somewhere on another drive, a program makes both calls.

Pitfalls: a trailing backslash (\TOOLS\) fails with error 3, except for the root itself; the path must be ASCIIZ, and name a directory, not a file. The whole path, drive included, must fit in 64 characters.

Coming back

The current directory belongs to the drive, not to the program. DOS keeps one per drive in its current directory structure, and a program that changes it and exits leaves the user there. Save it with INT 21h AH=47h first and change back before exiting. 47h returns the path without the leading backslash, so the example keeps a "\" in front of its buffer to make the saved path absolute:

prints: C:\ / back in the old directory
MOV AH, 47h ; DOS: the current directory, for later
MOV DL, 0 ; 0 = the current drive
MOV SI, OFFSET OLD1+1 ; after the "\" already there
INT 21h
MOV AH, 3Bh ; DOS: change the directory to DS:DX
MOV DX, OFFSET ROOT1 ; "\": the root
INT 21h
CALL PCWD ; prints "C:\"
MOV AH, 3Bh ; and back: "\" and the old path
MOV DX, OFFSET OLD1
INT 21h
MOV AH, 47h ; where are we now?
MOV DL, 0
MOV SI, OFFSET NOW1
INT 21h
CLD
MOV SI, OFFSET OLD1+1
MOV DI, OFFSET NOW1 ; ES = DS in a .COM
MOV CX, 64
REPE CMPSB ; the same 64 bytes?
MOV DX, OFFSET BACK1
JE SAME1
MOV DX, OFFSET LOST1
SAME1:
MOV AH, 09h
INT 21h
ROOT1 DB "\", 0
OLD1 DB "\", 64 DUP(0)
NOW1 DB 64 DUP(0)
BACK1 DB "back in the old directory", 13, 10, "$"
LOST1 DB "somewhere else", 13, 10, "$"
PCWD PROC NEAR ; print the current directory: C:\PATH
MOV AH, 19h ; the drive letter
INT 21h
ADD AL, "A"
MOV DL, AL
MOV AH, 02h
INT 21h
MOV DL, ":"
MOV AH, 02h
INT 21h
MOV DL, "\"
MOV AH, 02h
INT 21h
MOV AH, 47h ; the directory, without "\" in front
MOV DL, 0
MOV SI, OFFSET DIRBUF
INT 21h
CLD
PCWD1:
LODSB
OR AL, AL
JZ PCWD2
MOV DL, AL
MOV AH, 02h
INT 21h
JMP PCWD1
PCWD2:
MOV DX, OFFSET CRLF
MOV AH, 09h
INT 21h
RET
PCWD ENDP
DIRBUF DB 64 DUP(0)
CRLF DB 13, 10, "$"