The disk transfer area is a buffer DOS writes results into, at an address the program chooses. The name comes from CP/M: the FCB services (14h, 15h, 21h, 22h) read and write their records through it. Today its main user is the directory search, INT 21h AH=4Eh and 4Fh, which put each entry they find in the DTA.

1Ah sets the DTA to DS:DX. DOS only stores the far address; it does not check or clear the buffer. 2Fh returns the current address in ES:BX, which means it changes ES: in a .COM, PUSH CS / POP ES puts it back.

The default DTA

When a program starts, its DTA is PSP:0080h, the 128 bytes that hold the command tail. A find first with that DTA overwrites the program's arguments, so either read the tail first, or give the search a DTA of its own: 43 bytes are enough for 4Eh and 4Fh, 128 for FCB records.

prints: DTA at 0080 in our PSP / DTA now at our buffer
MOV AH, 2Fh ; DOS: get the DTA in ES:BX
INT 21h
MOV OLDOFS1, BX
MOV OLDSEG1, ES
MOV DX, OFFSET ATM1
MOV AH, 09h
INT 21h
MOV AX, OLDOFS1
CALL PHEX ; 0080
MOV DX, OFFSET INPSP1
MOV AX, CS
CMP AX, OLDSEG1 ; in a .COM, CS is the PSP
JE SAY1
MOV DX, OFFSET OTHER1
SAY1:
MOV AH, 09h
INT 21h
MOV AH, 1Ah ; DOS: the DTA is DS:DX from now on
MOV DX, OFFSET DTA1
INT 21h
MOV AH, 2Fh ; ask again
INT 21h
MOV DX, OFFSET NOWM1
CMP BX, OFFSET DTA1
JE SAY2
MOV DX, OFFSET OTHER1
SAY2:
MOV AH, 09h
INT 21h
PUSH CS ; 2Fh changed ES
POP ES
MOV AH, 1Ah ; and the DTA back where it was
MOV DX, 80h
INT 21h
OLDOFS1 DW 0
OLDSEG1 DW 0
ATM1 DB "DTA at $"
INPSP1 DB " in our PSP", 13, 10, "$"
OTHER1 DB " somewhere else", 13, 10, "$"
NOWM1 DB "DTA now at our buffer", 13, 10, "$"
DTA1 DB 128 DUP(0)
PHEX PROC NEAR ; print AX as four hex digits (changes AX BX CX DX)
MOV BX, AX
MOV CX, 4
PHEX1:
PUSH CX
MOV CL, 4
ROL BX, CL ; the top digit to the bottom
POP CX
MOV DL, BL
AND DL, 0Fh
ADD DL, "0"
CMP DL, "9"
JBE PHEX2
ADD DL, 7 ; "A" to "F"
PHEX2:
MOV AH, 02h
INT 21h
LOOP PHEX1
RET
PHEX ENDP

Whose DTA

DOS keeps a single DTA address, the running program's. EXEC sets it to the child's PSP:0080h, and a parent should not count on finding its own again after INT 21h AH=4Bh: set it again. A resident program or an interrupt handler that searches for files must save the DTA with 2Fh, set its own with 1Ah, and restore it before returning, or it destroys the search state of whatever program it interrupted.