;************************************************************** ;*** EMS581.ASM *** ;*** *** ;*** function EMS_Ems.getNumMappable40( *** ;*** var mappablePages: Word) *** ;*** : Boolean; *** ;*** *** ;*** Returns total number of mappable pages to pointer. *** ;*** *** ;*** Returns 0 if no error or an error code. *** ;*** *** ;*** (Ems Version 4.0) *** ;************************************************************** .model large,pascal include emsdefs.asm extrn errno:WORD ; ; Define entry point ; public EMS_Ems@getNumMappable40 .code EMS_Ems@getNumMappable40 proc mappable_pages:Far Ptr Word, self:DWord mov ax,GetNumMappable40 ; Make the call int Ems or ah,ah ; Check for error jnz error les bx,mappable_pages ; Return the number of... mov es:[bx],cx ; ... mappable pages xor ax,ax ; return OK ret error: mov al,ah ; AL gets error code xor ah,ah ; Zero extend mov errno,ax ; Save in errno too ret EMS_Ems@getNumMappable40 endp ; End of procedure end ; End of source file