home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / tasm / ofilfree.asm < prev    next >
Assembly Source File  |  1988-08-28  |  1KB  |  45 lines

  1.  
  2. ;    FILENAME: OFILFREE.ASM
  3. ;    Copyright (c) 1988 by Borland International, Inc.
  4. ;
  5. ;    Description: This module implements the routine FileFree. FileFree
  6. ;    deallocates a read/write buffer.
  7. ;
  8. ;    This module uses MASM mode syntax and standard segment directives. 
  9. ;    ASSEMBLY INSTRUCTIONS: To assemble this module use the following 
  10. ;    TASM command line. 
  11. ;        TASM ofilfree
  12.  
  13. include globals.inc
  14.  
  15. _TEXT   segment
  16.  
  17.     FileFree proc
  18.  
  19.     ;    Input 
  20.     ;        bx - file record offset
  21.     ;        [bx+2] - buffer size
  22.     ;    Output (of INT 21h, Function 49h)
  23.     ;        cf - set if error occurred
  24.     ;        ax - error code
  25.     ;            7 - if memory control blocks destroyed
  26.     ;            9 - if incorrect segment in ES
  27.     ;    Registers modified 
  28.     ;        ax
  29.  
  30.     push    ax
  31.     push    es
  32.     mov     es, [bx+6]      ;segment
  33.     mov     ah, 49h         ;function
  34.     int     21h             ;execute
  35.     pop     es
  36.     pop     ax
  37.     ret
  38.     FileFree endp
  39.  
  40. _TEXT    ends
  41.  
  42. end
  43.