; VgaMem Image Services, Copr. 1994 Matthias K”ppe

		INCLUDE	vmemdef.asm

CODE		SEGMENT BYTE PUBLIC

		PUBLIC	GetImageSize, ImageSize, GetImageLong, \
			MaskImage, PutImage

	MakeCallProc ImageLong
	MakeCallProc GetImage
	MakeCallProc MaskImage

PutImage	PROC FAR
		jmp     VgaMemProcs._PutImage
PutImage	ENDP

LongToWord	PROC NEAR
		or	dx, dx
		jnz	SHORT @@0
		cmp	ax, 0FFF0h
		jna	SHORT @@1
@@0:		xor	ax, ax
@@1:		retn
LongToWord	ENDP

ImageSize	PROC FAR
		pop	WORD PTR Temp[0]
		pop	WORD PTR Temp[2]
		call	VgaMemProcs._ImageLong
		call	LongToWord
		jmp	Temp
ImageSize	ENDP

GetImageLong	PROC FAR
		ARG	Image: DWORD = ArgSize
		push	bp
		mov	bp, sp
		les	di, Image
		push	0
		push	0
		push	WORD PTR es:[di]
		push	WORD PTR es:[di+2]
		call	VgaMemProcs._ImageLong
		pop	bp
		retf	ArgSize
GetImageLong	ENDP

GetImageSize	PROC FAR
		ARG	Image: DWORD = ArgSize
		push	bp
		mov	bp, sp
		les	di, Image
		push	0
		push	0
		push	WORD PTR es:[di]
		push	WORD PTR es:[di+2]
		call	VgaMemProcs._ImageLong
		call	LongToWord
		pop	bp
		retf	ArgSize
GetImageSize	ENDP

CODE		ENDS

		END
