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

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;               Function 49H: Free Memory Block              ;
  4.         ;                                                            ;
  5.         ;               int free_block(blockseg)                     ;
  6.         ;                   int blockseg;                            ;
  7.         ;                                                            ;
  8.         ;               Returns 0 if block freed OK,                 ;
  9.         ;               otherwise returns error code.                ;
  10.         ;                                                            ;
  11.         ;************************************************************;
  12.  
  13. cProc   free_block,PUBLIC
  14. parmW   blockseg
  15. cBegin
  16.         mov     es,blockseg     ; Get block address.
  17.         mov     ah,49h          ; Set function code.
  18.         int     21h             ; Ask MS-DOS to free memory.
  19.         jb      fb_err          ; Branch on error.
  20.         xor     ax,ax           ; Return 0 if successful.
  21. fb_err:
  22. cEnd
  23.