;************************************************************** ;*** XMS11.ASM *** ;*** *** ;*** function XMS_Xms.freeUM( *** ;*** address: Pointer) *** ;*** : Boolean; *** ;*** *** ;*** Frees a previously allocated Upper Memory Block *** ;*** *** ;************************************************************** .model large,pascal include xmsdefs.asm extrn errno:WORD extrn xmsHandler:DWord ; ; Define entry point ; public XMS_Xms@freeUM .code XMS_Xms@freeUM proc addressHi:Word, addressLo:Word, self:DWord mov ax,addressLo ; Get offset or ax,ax ; See if it's zero (better be) jnz offsetError ; It's no good mov dx,addressHi ; Block segment address mov ah,XMSFreeUM ; Function code call xmsHandler ; call the guy or ax,ax ; AX=0 means error jz errorReturn mov ax,XMSErrOK ; No error ret offsetError: mov bl,XMSErrUMBInv ; bogus UMB errorReturn: mov al,bl ; Move error code to AL xor ah,ah ; Zero extend to 16 bits mov errno,ax ; Copy to errno ret XMS_Xms@freeUM endp ; end of procedure end