;************************************************************** ;*** EMS5A0.ASM *** ;*** *** ;*** function EMS_EmBlk.allocHandleStd40( *** ;*** pages: Word) *** ;*** : Boolean; *** ;*** *** ;*** Allocates standards pages and returns handle 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_EmBlk@allocHandleStd40 .code EMS_EmBlk@allocHandleStd40 proc pages:Word, handle:Far Ptr Word mov bx,pages ; BX gets # pages to allocate mov ax,AllocHandleStd40 ; Do EMS call int Ems or ah,ah ; Set flags jnz error les bx,handle ; Return handle to caller mov es:[bx],dx 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_EmBlk@allocHandleStd40 endp ; End of procedure end ; End of source file