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

  1.     .model    large,pascal
  2.  
  3.     include ems.inc
  4.  
  5.     .code    EMS_TEXT
  6.  
  7.     ;ERR PUBLIC __ErrEmsGetHandleAttribute(HEMS hems, PBYTE pbAttribute);
  8.  
  9.     public    __ErrEmsGetHandleAttribute
  10. __ErrEmsGetHandleAttribute    proc    \
  11.     hems:word,            \
  12.     pbAttribute:ptr byte
  13.  
  14.     mov    dx,[hems]
  15.     mov    ax,5200h
  16.     int    67h
  17.  
  18.     ;AL = handle attribute
  19.  
  20.     les    bx,[pbAttribute]
  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. __ErrEmsGetHandleAttribute    endp
  33.  
  34.     end
  35.