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

  1. fname   db      'C:\TEMP\'      ; generated ASCIIZ filename
  2.         db      13 dup (0)      ; is appended by MS-DOS
  3.  
  4. fhandle dw      ?
  5.         .
  6.         .
  7.         .
  8.         mov     dx,seg fname    ; DS:DX = address of
  9.         mov     ds,dx           ; path for temporary file
  10.         mov     dx,offset fname
  11.         xor     cx,cx           ; CX = normal attribute
  12.         mov     ah,5ah          ; Function 5AH = create
  13.                                 ; temporary file
  14.         int     21h             ; transfer to MS-DOS
  15.         jc      error           ; jump if create failed
  16.         mov     fhandle,ax      ; else save file handle
  17.         .
  18.         .
  19.         .
  20.