home *** CD-ROM | disk | FTP | other *** search
-
- emm_int equ 67h
-
- if1
- INCLUDE model.mac
- endif
-
- header
-
- begdataseg
- EXTRN _emserr :byte
- EXTRN _EMSAvPgs :word
- enddataseg
-
- begcodeseg
- EXTRN _emspgsowned :NEAR
- procstart __emsclose
- push bp
- mov bp,sp
- mov dx,WORD PTR [bp+4] ; move handle into dx
- push dx
- call _emspgsowned
- add sp,2
- cmp _emserr,0 ; check for error
- jnz error
- mov ax,_EMSAvPgs ; update EMSAvPgs
- add ax,bx ; bx contains the number of pages -
- mov _EMSAvPgs,ax ; owned by the handle
- mov dx,WORD PTR [bp+4] ; move handle into dx
- mov ah,45h
- int emm_int ; call EMM
- error: mov al,ah ; move ah down to
- xor ah,ah ; al
- mov _emserr,al ; update emserr
- pop bp
- ret
- procend __emsclose
- endcodeseg
- END
-
-