home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddrivers.zip / UTILS / FREELIDE.ASM < prev    next >
Assembly Source File  |  1992-07-06  |  798b  |  36 lines

  1. ;  DevHlp 0x35
  2. ;  this routine releases the logical ID (LID) 
  3. ;
  4. ;  C Calling Sequence:
  5. ;  if (FreeLIDEntry (USHORT id) ) err
  6. ;
  7.      include drvlib.inc
  8. ;
  9.      public  FREELIDENTRY
  10.  
  11.      extrn   _DevHlp:dword
  12.      assume  CS: _TEXT
  13. _TEXT        segment word public 'CODE'
  14.  
  15. FREELIDENTRY  proc near
  16.  
  17.      push    bp
  18.      mov     bp,sp
  19.      mov     ax,[bp+4] ; logical ID
  20.      mov     dl,DevHlp_FreeLIDEntry
  21.      call    [_DevHlp]
  22.      jc      error           ; error from device help
  23.      xor     ax,ax           ; no errors
  24.      pop     bp
  25.      ret     2               ; fix up the stack
  26. error:    
  27.      mov     ax,1            ; return error for C
  28.      pop     bp
  29.      ret     2               ; fix up stack and return
  30.  
  31. FREELIDENTRY  endp
  32. _TEXT     ends
  33.      end
  34.  
  35.  
  36.