home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / section5 / fxn2fh.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  926 b   |  18 lines

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;           Function 2FH: Get DTA Address                    ;
  4.         ;                                                            ;
  5.         ;           char far *get_DTA()                              ;
  6.         ;                                                            ;
  7.         ;           Returns a far pointer to the DTA buffer.         ;
  8.         ;                                                            ;
  9.         ;************************************************************;
  10.  
  11. cProc   get_DTA,PUBLIC
  12. cBegin
  13.         mov     ah,2fh          ; Set function code.
  14.         int     21h             ; Ask MS-DOS for current DTA address.
  15.         mov     ax,bx           ; Return offset in AX.
  16.         mov     dx,es           ; Return segment in DX.
  17. cEnd
  18.