mov ah, 2Fh ;Get Disk Transfer Address
int 21h
mov word ptr [CurrentDTA], bx ;es:bx is current DTA
mov word ptr [CurrentDTA+2], es
Get Disk Transfer Address (Function 2Fh) returns the segment and offset of the current disk transfer address (DTA).
This function has no parameters.
The ES:BX registers contain the DTA. The ES register contains the segment address, and the BX register contains the offset.
There is no way to determine the size of the buffer at the DTA.
If Set Disk Transfer Address (Function 1Ah) has not been used to set the DTA, MS-DOS sets a program's default DTA to be offset 0080h in the program segment prefix (PSP). The default DTA cannot be used with a record size larger than 128 bytes.
Function 1Ah Set Disk Transfer Address