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.
GetDTA
◄Example► ◄Back► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
;* GetDTA - Gets address of current Disk Transfer Area.
;*
;* Shows: DOS Function - 2Fh (Get DTA Address)
;*
;* Params: dta - Far pointer to receive transfer address
;*
;* Return: None
GetDTA PROC \
dta:FAR PTR BYTE
mov ah, 2Fh ; DOS Function 2Fh
int 21h ; Get DTA Address in ES:BX
mov ax, es ; Save DTA segment
mov dx, bx ; Save DTA offset
les bx, dta ; Now ES:BX points to variable
mov es:[bx], dx ; Copy DTA address to
mov es:[bx+2], ax ; dta variable
ret
GetDTA ENDP
-♦-