; VgaMem Definitions, Copr. 1994 Matthias K”ppe

		INCLUDE grdef.asm

TVgaMemProcs	STRUC
 _CapsNoMap	DW	?
 _CapsMap	DW	?
 _GetBPL	DW	?
 _GetSize	DW	?
 _CS_Addr	DW	?
 _CS_Copy	DW	?
 _SaveScreen	DW	?
 _RestoreScreen	DW	?
 _ImageLong	DW	?
 _GetImage	DW	?
 _PutImage	DW	?
 _MaskImage	DW	?
TVgaMemProcs	ENDS

DATA		SEGMENT WORD PUBLIC

		EXTRN	BlockList: DWORD, ListSize: WORD, VgaMemSeg: WORD, \
			SourcePage: WORD, DestPage: WORD, Temp: DWORD, \
			RealCaps: WORD, CopyDeltaHack: WORD, VgaMemProcs: TVgaMemProcs

DATA		ENDS

; capability flags

vmcImage	EQU	1
vmcCopy		EQU	2
vmcSaveRestore	EQU	4
vmcBuffer	EQU	8
vmcBackPut	EQU	16

; CopyScreen subroutines
; variables on CopyScreen's stack frame

_x1		EQU	WORD PTR [bp+16]
_y1		EQU	WORD PTR [bp+14]
_x2		EQU	WORD PTR [bp+12]
_y2		EQU	WORD PTR [bp+10]
_x3		EQU	WORD PTR [bp+8]
_y3		EQU	WORD PTR [bp+6]
_Mask1		EQU	BYTE PTR [bp-1]
_Mask2		EQU	BYTE PTR [bp-2]
_Shift		EQU	BYTE PTR [bp-3]
_Method		EQU	BYTE PTR [bp-4]
_ReadMap	EQU	BYTE PTR [bp-5]
_WriteMap	EQU	BYTE PTR [bp-6]
_Off		EQU	WORD PTR [bp-8]
_BPL		EQU	WORD PTR [bp-10];

MakeCallProc	MACRO	ProcName
		PUBLIC	ProcName
ProcName	PROC FAR
		pop	WORD PTR Temp[0]
		pop	WORD PTR Temp[2]
		call	VgaMemProcs._&ProcName
		jmp	Temp
ProcName	ENDP
		ENDM

