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

  1.     .model    large,pascal
  2.  
  3.     include ems.inc
  4.  
  5.     .code    EMS_TEXT
  6.  
  7.     ;ERR PUBLIC __ErrEmsGetUnallocatedPageCount(PUSHORT *pcPages, PUSHORT *pcPagesTotal);
  8.  
  9.     public    __ErrEmsGetUnallocatedPageCount
  10. __ErrEmsGetUnallocatedPageCount    proc    \
  11.     pcPages:ptr word,        \
  12.     pcPagesTotal:ptr word
  13.  
  14.     EmsCall 42h
  15.     jnz    Exit            ;Brif error
  16.  
  17.     ;BX = unallocated pages
  18.     ;DX = total pages
  19.  
  20.     mov    cx,bx
  21.     les    bx,[pcPages]
  22.     mov    es:[bx],cx
  23.  
  24.     les    bx,[pcPagesTotal]
  25.     mov    es:[bx],dx
  26.  
  27. Exit:
  28.     ret
  29.  
  30. __ErrEmsGetUnallocatedPageCount    endp
  31.  
  32.     end
  33.