home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / mslang / vm / src / ems / ems5400.asm < prev    next >
Encoding:
Assembly Source File  |  1993-12-14  |  769 b   |  35 lines

  1.     .model  large,pascal
  2.  
  3.     include ems.inc
  4.  
  5.     .code   EMS_TEXT
  6.  
  7.     ;ERR PUBLIC __ErrEmsGetHandleDirectory(PVOID pDirectory, PBYTE pcEntries);
  8.  
  9.     public  __ErrEmsGetHandleDirectory
  10. __ErrEmsGetHandleDirectory      proc    uses di,\
  11.     pDirectory:ptr,                 \
  12.     pcEntries:ptr byte
  13.  
  14.     les     di,[pDirectory]
  15.     mov     ax,5400h
  16.     int     67h
  17.  
  18.     ;AL = number of entries in directory
  19.  
  20.     les     bx,[pcEntries]
  21.     mov     es:[bx],al
  22.  
  23.     xchg    al,ah                   ;AL = Error code
  24.     cbw                             ;AH = 00 or FF
  25.     or      ax,ax                   ;Any error
  26.     jz      Exit                    ;Brif not, return errNoError = 0
  27.     add     ax,errEmsBase-0FF80h    ;Map to ERR value
  28.  
  29. Exit:
  30.     ret
  31.  
  32. __ErrEmsGetHandleDirectory      endp
  33.  
  34.     end
  35.