Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-1


				page	58,132
				;******************************************************************************
					title	EMMSUP - EMM support routines
				;******************************************************************************
				;
				;   (C) Copyright MICROSOFT Corp. 1986
				;
				;   Title:	CEMM.EXE - COMPAQ Expanded Memory Manager 386 Driver
				;		EMMLIB.LIB - Expanded Memory Manager Functions Library
				;
				;   Module:	EMMSUP - EMM support routines 
				;
				;   Version:	0.04
				;
				;   Date:	May 13, 1986
				;
				;******************************************************************************
				;
				;   Change log:
				;
				;     DATE    REVISION                  DESCRIPTION
				;   --------  --------  -------------------------------------------------------
				;   5/13/86   Original	Initial _TEXT
				;   6/14/86		Added _sotofar routine and removed stack define.
				;   			And added protected mode check to Map_Page (SBP).
				;   6/14/86		map_page now sets _current_map(SBP).
				;   6/14/86		moved save_current_map and restore_map from C code (SBP)
				;   6/14/86		brought SegOffTo24 and SetDescInfo in from LAST code
				;			segment as local routines(SBP).
				;   6/21/86    0.02	cld in copyout (SBP).
				;   6/21/86    0.02	MapHandlePage added.
				;   6/23/86    0.02	make_addr, sotofar removed. source_addr and dest_addr
				;			added.
				;   6/27/86    0.02	Fix for restore_map.
				;   6/28/86    0.02	Name change from CEMM386 to CEMM (SBP).
				;   7/06/86    0.04	Changed _emm_page,_emm_free, & _pft386 to ptrs (SBP).
				;   7/06/86    0.04	Changed assumes from _DATA to DGROUP (SBP).
				;   7/06/86    0.04	Changed internal save area structure (SBP).
				;   7/06/86    0.04	moved SavePageMap and RestorePageMap to .ASM (SBP).
				;   7/07/86    0.04	moved MapHandlePage,SavePageMap, and RestorePageMap to
				;			emmp.asm (SBP).
				;   5/09/88    1.01	moved routines names_match and flush_tlb from win386 
				;   9/01/88		rename SegOffTo24/SetDescInfo to
				;			SegOffTo24Resident/SetDescInfoResdient and made public
				;******************************************************************************
				;
				;   Functional Description:
				;	Support routines for emm/386
				;	C callable 
				;
				;
				;******************************************************************************
				.lfcond					; list false conditionals
				.386p
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-2


				
				;******************************************************************************
				;	P U B L I C S
				;******************************************************************************
					public _source_addr
					public _dest_addr
					public _copyout
					public _copyin
					public _wcopy
					public _wcopyb
					public _valid_handle
					public SetDescInfoResident
					public SegOffTo24Resident
				;
				;******************************************************************************
				;	 D E F I N E S
				;******************************************************************************
				
					include	vdmseg.inc
			     C	
			     C	
			     C	;******************************************************************************
			     C	;
			     C	;   (C) Copyright MICROSOFT Corp. 1986
			     C	;
			     C	;   Title:    MEMM - MICROSOFT Expanded Memory Manager 386
			     C	;
			     C	;   Module:   VDMSEG.INC - Segment Ordering and attributes for VDM
			     C	;
			     C	;   Version:  0.04
			     C	;
			     C	;   Date:     May 12, 1986
			     C	;
			     C	;   Author:
			     C	;
			     C	;******************************************************************************
			     C	;
			     C	;   Change log:
			     C	;
			     C	;     DATE    REVISION			DESCRIPTION
			     C	;   --------  --------	-------------------------------------------------------
			     C	;	      Original
			     C	;   05/12/86  A 	Cleanup and segment reorganization
			     C	;   06/03/86  C 	changed order and added STACK and STACK0,STACK0_SIZE
			     C	;   06/06/86  C 	changed CODE to _TEXT and DATA to _DATA
			     C	;   06/28/86  0.02	Name change from MEMM386 to MEMM
			     C	;   07/05/86  0.04	Re-organized to allow code seg move
			     C	;   06/03/88		add use16 to all segments
			     C	;
			     C	;******************************************************************************
			     C	ifndef INC_LIST
			     C	.list	; end of VDMSEG.INC
			     C	
					include vdmsel.inc
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-3


			     C	
			     C	
			     C	;******************************************************************************
			     C	;
			     C	;   (C) Copyright MICROSOFT Corp. 1986
			     C	;
			     C	;   Title:    MEMM - MICROSOFT Expanded Memory Manager 386
			     C	;
			     C	;   Module:   VDMSEL.INC - Selector Definitions for MEMM
			     C	;
			     C	;   Version:  0.05
			     C	;
			     C	;   Date:     May 12, 1986
			     C	;
			     C	;   Author:
			     C	;
			     C	;******************************************************************************
			     C	;
			     C	;   Change log:
			     C	;
			     C	;     DATE    REVISION			DESCRIPTION
			     C	;   --------  --------	-------------------------------------------------------
			     C	;	      Original
			     C	;   05/12/86  A 	Cleanup and segment reorganization
			     C	;   06/07/86  C 	merged with module from Rick
			     C	;   06/28/86  0.02	Name change from MEMM386 to MEMM
			     C	;   07/10/86  0.05	Changed CODE_GSEL to RCODEA_GSEL
			     C	;   07/20/88		Remove debugger selectors
			     C	;
			     C	;******************************************************************************
			     C	ifndef INC_LIST
			     C	.list	; end of VDMSEL.INC
			     C	
					include desc.inc
			     C	
			     C	
			     C	;******************************************************************************
			     C	;
			     C	;   (C) Copyright MICROSOFT Corp. 1986
			     C	;
			     C	;   Title:    MEMM - MICROSOFT Expanded Memory Manager 386
			     C	;
			     C	;   Module:   DESC.INC - Descriptor Table Definitions for 286/386
			     C	;
			     C	;   Version:  0.02
			     C	;
			     C	;   Date:     January 31, 1986
			     C	;
			     C	;   Author:
			     C	;
			     C	;******************************************************************************
			     C	;
			     C	;   Change log:
			     C	;
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-4


			     C	;     DATE    REVISION			DESCRIPTION
			     C	;   --------  --------	-------------------------------------------------------
			     C	;   01/31/86  Original
			     C	;   04/07/86  A 	added bit map base to 386 TSS
			     C	;   05/12/86  B 	Cleanup and segment reorganization
			     C	;   06/25/86  0.02	removed A0 macros
			     C	;   06/28/86  0.02	Name change from MEMM386 to MEMM
			     C	;
			     C	;******************************************************************************
			     C	ifndef INC_LIST
			     C	.list	; end of DESC.INC
			     C	
					include page.inc
			     C	
			     C	
			     C	;******************************************************************************
			     C	;
			     C	;   (C) Copyright MICROSOFT Corp. 1986
			     C	;
			     C	;   Title:    MEMM - MICROSOFT Expanded Memory Manager 386
			     C	;
			     C	;   Module:   PAGE.INC - Definitions for paging on 386
			     C	;
			     C	;   Version:  0.02
			     C	;
			     C	;   Date:     January 31, 1986
			     C	;
			     C	;   Author:
			     C	;
			     C	;******************************************************************************
			     C	;
			     C	;   Change log:
			     C	;
			     C	;     DATE    REVISION			DESCRIPTION
			     C	;   --------  --------	-------------------------------------------------------
			     C	;   01/31/86  Original
			     C	;   05/12/86  A	Cleanup and segment reorganization
			     C	;   06/28/86  0.02	Name change from MEMM386 to MEMM
			     C	;
			     C	;******************************************************************************
			     C	;
			     C	;   Functional Description:
			     C	;
			     C	;******************************************************************************
			     C	ifndef INC_LIST
			     C	.list		; end of PAGE.INC
				;	include instr386.inc
					include	emmdef.inc
			     C	;******************************************************************************
			     C	;
			     C	;   (C) Copyright MICROSOFT Corp. 1986
			     C	;
			     C	;   Title:    CEMM.EXE - COMPAQ Expanded Memory Manager 386 Driver
			     C	;		EMMLIB.LIB - Expanded Memory Manager Library
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-5


			     C	;
			     C	;   Module:   EMMDEF.INC - defines for EMM code.
			     C	;
			     C	;   Version:  0.04
			     C	;
			     C	;   Date:     June 21, 1986
			     C	;
			     C	;******************************************************************************
			     C	;
			     C	;   Change log:
			     C	;
			     C	;     DATE    REVISION			DESCRIPTION
			     C	;   --------  --------	-------------------------------------------------------
			     C	;   06/21/86  Original
			     C	;   06/25/86  0.02	Changed HANDLE_CNT to 255 to match LIM spec (SBP).
			     C	;   06/28/86  0.02	Name change from CEMM386 to CEMM (SBP).
			     C	;   07/06/86  0.04	Changed save area struct (SBP).
			     C	;   05/25/88            Changed to meet LIM 4.0 Spec (PC)
			     C	;******************************************************************************
			     C	ifndef	INC_LIST
			     C	.list		; end of EMMDEF.INC
			     C	
			     C	
			     C	
			     C	
				
 = 0000				FALSE		equ	0
 = FFFFFFFF			TRUE		equ	not FALSE
 = 000D				CR		equ	0dh
 = 000A				LF		equ	0ah
				
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-6


					page
				;******************************************************************************
				;	E X T E R N A L   R E F E R E N C E S
				;******************************************************************************
				
 0000				_DATA	SEGMENT
				;
				;  pointer to entry stack frame
				;	stored as offset, SS
				extrn	_regp:word
				
				;
				;   current state of mapping registers and # of mapping registers emulated
				;
				;extrn	_current_map:byte
				;extrn	_map_size:byte
				
				;
				; total # of EMM pages in system
				;
				extrn	_total_pages:word
				
				;
				; table of offsets into in to the first page table
				; for user logical emm page map
				;
				extrn	_page_frame_base:dword
				
				;
				; ptr to table of emm page # for each handle's logical pages.
				;
				extrn	_emm_page:word
				
				;
				; ptr to table of page table entries for the EMM pages
				;
				extrn	_pft386:word		; note: actually a dword array
				
				;
				;  handle data structure
				;
				extrn	_handle_table:word
				extrn	_handle_table_size:word
				
				;
				;   save area for handles
				;
				extrn	_save_map:byte
				
 0000				_DATA	ENDS
				
				
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-7


					page
				;******************************************************************************
				;	L O C A L   D A T A
				;******************************************************************************
 0000				_DATA	SEGMENT
				;
				; kludge to prevent unresolved from C compiler
				;
				public	__acrtused
 0000				__acrtused	label	dword
 0000  00000000				dd (0)
 0004				_DATA	ENDS
				
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-8


					page
				;******************************************************************************
				;	C O D E
				;******************************************************************************
 0000				_TEXT	SEGMENT
				assume	cs:_TEXT, ds:DGROUP, ss:DGROUP
				
				;***********************************************
				;
				; _source_addr - return far pointer for source address (= int 67 entry DS:SI).
				;
				;  SYNOPSIS:	src = source_addr()
				;		char far *src;	/* ptr to area at DS:SI */
				;
				;  DESCRIPTION:	This function generates a far pointer equivalent to the client's
				;		DS:SI pointer.  If this code was called in protected mode, the
				;		address is a (selector,offset) pair; otherwise, it is a segment
				;		offset pair.  EMM1_GSEL is used if a selector is needed.
				;
				; 05/09/88  ISP   No update needed for MEMM
				;***********************************************
 0000				_source_addr	proc	near
				;
 0000  55				push	bp
				;
 0001  8B 2E 0000 E			mov	bp,[_regp]			; get entry stack frame pointer
 0005  F7 46 24 0020			test	[bp.PFlag],PFLAG_VIRTUAL	;Q: real/virtual mode ?
 000A  0F 85 0017 R			jnz	sa_pm				; N: go get selector/offset
 000E  8B 46 04				mov	ax,word ptr [bp.rSI]		; Y: get offset
 0011  8B 56 26				mov	dx,word ptr [bp.rDS]		;    get segment
 0014  EB 22 90				jmp	sa_exit				;    return DX:AX = seg:offset
				;
				;  protected mode - set up selector to client's DS
 0017				sa_pm:
 0017  53				push	bx
 0018  51				push	cx
 0019  06				push	es			; save ES
					; 
					; load ES with GDT alias
					;
 001A  6A 08				push	GDTD_GSEL
 001C  07				pop	es			; ES -> GDT
					;
					; compute physical address
					;
 001D  8B 46 26				mov	ax,word ptr [bp.rDS]	; ax <-- base addr
 0020  8B 56 04				mov	dx,word ptr [bp.rSI]	; dx <-- offset
 0023  E8 0148 R			call	SegOffTo24Resident	; converts to physical addr
				
					;
					; set up the appropriate table entry
					;
 0026  BB 0100				mov	bx,EMM1_GSEL 	; bx <-- selector 
 0029  B9 FFFF				mov	cx,0FFFFh	; cx <-- gets limit (64k)
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-9


 002C  B4 92				mov	ah,D_DATA0	; ah <-- gets access rights
					;
					; at this point:
					;	ah -- access rights
					;	al -- bits 16-23 of linear address
					;	dx -- low 16 bits of linear address
					;	cx -- limit = 64k
					;	bx -- selector
					;	es -- selector to GDT Alias
 002E  E8 0133 R			call	SetDescInfoResident	; set up descriptor
				
					; 
					; set up return pointer
					;
 0031  33 C0				xor	ax,ax		; ax <-- offset (0)
 0033  8B D3				mov	dx,bx		; dx <-- selector
					;
 0035  07				pop	es		; restore ES
 0036  59				pop	cx
 0037  5B				pop	bx
				;
 0038				sa_exit:
 0038  5D				pop	bp
 0039  C3				ret
				;
 003A				_source_addr	endp
				
				;***********************************************
				;
				; _dest_addr - return far pointer for destination address (= int 67 entry ES:DI).
				;
				;  SYNOPSIS:	dest = dest_addr()
				;		char far *dest;	/* ptr to area at ES:DI */
				;
				;  DESCRIPTION:	This function generates a far pointer equivalent to the client's
				;		ES:DI pointer.  If this code was called in protected mode, the
				;		address is a (selector,offset) pair; otherwise, it is a segment
				;		offset pair.  EMM2_GSEL is used if a selector is needed.
				;
				; 05/09/88  ISP   No update needed for MEMM
				;***********************************************
 003A				_dest_addr	proc	near
				;
 003A  55				push	bp
				;
 003B  8B 2E 0000 E			mov	bp,[_regp]			; get entry stack frame pointer
 003F  F7 46 24 0020			test	[bp.PFlag],PFLAG_VIRTUAL	;Q: real/virtual mode ?
 0044  0F 85 0051 R			jnz	da_pm				; N: go get selector/offset
 0048  8B 46 00				mov	ax,word ptr [bp.rDI]		; Y: get offset
 004B  8B 56 28				mov	dx,word ptr [bp.rES]		;    get segment
 004E  EB 22 90				jmp	da_exit				;    return DX:AX = seg:offset
				;
				;  protected mode - set up selector to client's DS
 0051				da_pm:
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-10


 0051  53				push	bx
 0052  51				push	cx
 0053  06				push	es			; save ES
					; 
					; load ES with GDT alias
					;
 0054  6A 08				push	GDTD_GSEL
 0056  07				pop	es			; ES -> GDT
					;
					; compute physical address
					;
 0057  8B 46 28				mov	ax,word ptr [bp.rES]	; ax <-- base addr
 005A  8B 56 00				mov	dx,word ptr [bp.rDI]	; dx <-- offset
 005D  E8 0148 R			call	SegOffTo24Resident	; converts to physical addr
				
					;
					; set up the appropriate table entry
					;
 0060  BB 0108				mov	bx,EMM2_GSEL 	; bx <-- selector 
 0063  B9 FFFF				mov	cx,0FFFFh	; cx <-- gets limit (64k)
 0066  B4 92				mov	ah,D_DATA0	; ah <-- gets access rights
					;
					; at this point:
					;	ah -- access rights
					;	al -- bits 16-23 of linear address
					;	dx -- low 16 bits of linear address
					;	cx -- limit = 64k
					;	bx -- selector
					;	es -- selector to GDT Alias
 0068  E8 0133 R			call	SetDescInfoResident	; set up descriptor
					
					; 
					; set up return pointer
					;
 006B  33 C0				xor	ax,ax		; ax <-- offset (0)
 006D  8B D3				mov	dx,bx		; dx <-- selector
					;
 006F  07				pop	es		; restore ES
 0070  59				pop	cx
 0071  5B				pop	bx
				;
 0072				da_exit:
 0072  5D				pop	bp
 0073  C3				ret
				;
 0074				_dest_addr	endp
				
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-11


					page
				;***********************************************
				;
				; _copyout
				;
				; This routine takes a far pointer, a near pointer
				; and a byte count and copies from the near address
				; to the far address.
				;
				; Parameters:
				;	destptr -- sel:off 286 pointer to target area
				;	srcptr --- offset of source data in current D Seg
				;	count ---- byte count for copy
				;
				; uses:
				;	cx, ax, es
				;
				; 05/09/88  ISP   No update needed for MEMM
				;***********************************************
 = 0004				destptr	=	4
 = 0008				srcptr	=	8
 = 000A				count	=	10
 0074				_copyout	proc	near
 0074  55				push	bp		; entry prolog
 0075  8B EC				mov	bp,sp
 0077  57				push	di		; reg var
 0078  56				push	si		; reg var
				
 0079  C4 7E 04				les	di,[bp+destptr]	; es:di <-- destination address
 007C  8B 76 08				mov	si,[bp+srcptr]	; ds:si <-- source address
 007F  8B 4E 0A				mov	cx,[bp+count]	; cx <-- byte count
 0082  FC				cld			;  strings foward
 0083  F3/ A4				rep movsb		; do it
				
 0085  5E				pop	si		; restore reg var
 0086  5F				pop	di		; restore reg var
 0087  5D				pop	bp		
 0088  C3				ret
 0089				_copyout	endp
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-12


					page
				
				;***********************************************
				;
				; _copyin
				;
				; This routine takes a near pointer, a far pointer
				; and a byte count and copies from the far address
				; to the near address.
				;
				; Parameters:
				;	destptr -- offset of dest in current D Seg
				;	srcptr --- sel:off 286 pointer to source data area
				;	count ---- byte count for copy
				;
				; uses:
				;	cx, ax, es
				;
				; 05/09/88  ISP   Written for MEMM.
				;***********************************************
 = 0004				destptr	=	4
 = 0006				srcptr	=	6
 = 000A				count	=	10
 0089				_copyin	proc	near
 0089  55				push	bp		; entry prolog
 008A  8B EC				mov	bp,sp
 008C  57				push	di		; reg var
 008D  56				push	si		; reg var
 008E  1E				push	ds
				
 008F  1E				push	ds
 0090  07				pop	es		; es to dgroup
				
 0091  8B 7E 04				mov	di,[bp+destptr]	; es:di <-- destination address
 0094  C5 76 06				lds	si,[bp+srcptr]	; ds:si <-- source address
 0097  8B 4E 0A				mov	cx,[bp+count]	; cx <-- byte count
 009A  FC				cld			;  strings foward
 009B  F3/ A4				rep movsb		; do it
				
 009D  1F				pop	ds
 009E  5E				pop	si		; restore reg var
 009F  5F				pop	di		; restore reg var
 00A0  5D				pop	bp		
 00A1  C3				ret
 00A2				_copyin	endp
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-13


					page
				;***********************************************
				;
				; _wcopy
				;
				; This routine takes a two near pointers
				; and a word count and copies from the 
				; first address to the second address.
				;
				; Parameters:
				;	srcptr --- offset of source data in current D Seg
				;	destptr -- offset of destination address in DS
				;	count ---- word count for copy
				;
				; uses:
				;	si, di, cx, ax
				;	(si, di are restored)
				;
				; 05/09/88  ISP   No update needed for MEMM
				;***********************************************
 = 0004				srcptr	=	4
 = 0006				destptr	=	6
 = 0008				count	=	8
 00A2				_wcopy	proc	near
 00A2  55				push	bp		; entry prolog
 00A3  8B EC				mov	bp,sp
 00A5  57				push	di		; reg var
 00A6  56				push	si		; reg var
				
 00A7  FC				cld			; clear dir flag (forward move)
 00A8  8C D8				mov	ax,ds		;
 00AA  8E C0				mov	es,ax		; mov es,ds 
 00AC  8B 7E 06				mov	di,[bp+destptr]	; es:di <-- destination address
 00AF  8B 76 04				mov	si,[bp+srcptr]	; ds:si <-- source address
 00B2  8B 4E 08				mov	cx,[bp+count]	; cx <-- word count
 00B5  F3/ A5				rep movsw		; do it
				
 00B7  5E				pop	si		; restore reg var
 00B8  5F				pop	di		; restore reg var
 00B9  5D				pop	bp		
 00BA  C3				ret
 00BB				_wcopy	endp
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-14


					page
				;***********************************************
				;
				; _wcopyb
				;
				; This routine takes a two near pointers
				; and a word count and copies from the 
				; first address to the second address.
				; The copy is done backwards to allow certain overlap of source and destination.
				;
				; Parameters:
				;	srcptr --- offset of source data in current D Seg
				;	destptr -- offset of destination address in DS
				;	count ---- word count for copy
				;
				; uses:
				;	si, di, cx, ax, es
				;	(si, di are restored)
				;
				; 05/20/88  ISP   Shifted in from win386 and updated for 16 bit ptrs
				;***********************************************
 = 0004				srcptr	=	4
 = 0006				destptr	=	6
 = 0008				count	=	8
 00BB				_wcopyb	proc	near
 00BB  55				push	bp		; entry prolog
 00BC  8B EC				mov	bp,sp
 00BE  57				push	di		; reg var
 00BF  56				push	si		; reg var
				
 00C0  8C D8				mov	ax,ds		;
 00C2  8E C0				mov	es,ax		; mov es,ds 
 00C4  8B 7E 06				mov	di, word ptr [bp+destptr]      ; destination address
 00C7  8B 76 04				mov	si, word ptr [bp+srcptr]       ; source address
 00CA  8B 4E 08				mov	cx, word ptr [bp+count]        ; word count
 00CD  49				dec	cx
 00CE  D1 E1				shl	cx, 1				; offset of 'last' word to move
 00D0  03 F1				add	si, cx
 00D2  03 F9				add	di, cx
 00D4  8B 4E 08				mov	cx, word ptr [bp+count]        ; recover word count
				
 00D7  FD				std			; set dir flag (backward move)
 00D8  F3/ A5				rep movsw		; do it
 00DA  FC				cld			; 'C' tends to expect this.
				
 00DB  5E				pop	si		; restore reg var
 00DC  5F				pop	di		; restore reg var
 00DD  5D				pop	bp		
 00DE  C3				ret
 00DF				_wcopyb	endp
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-15


					page
				;***********************************************
				;
				; _valid_handle - validate current handle
				;
				;  SYNOPSIS:	hp = _valid_handle()
				;		struct handle_ptr *hp;	/* ptr to handle's structure */
				;					/* OR NULL_HANDLE if invalid handle */
				;				/* also sets AH = INVALID_HANDLE if it fails */
				;
				;  DESCRIPTION:	This routine validates the current handle in regp->rDX and
				;		returns either an error or a ptr to the handle's index and
				;		page count structure.
				;
				; 05/09/88  ISP   No update needed for MEMM
				;***********************************************
 00DF				_valid_handle	proc	near
				;
 00DF  55				push	bp
 00E0  8B 2E 0000 E			mov	bp,[_regp]		; get entry args pointer
 00E4  53				push	bx
				;
 00E5  8B 5E 14				mov	bx,word ptr [bp.rDX]	; BX = entry handle
 00E8  3B 1E 0000 E			cmp	bx,[_handle_table_size]	;Q: handle in range ?
 00EC  0F 83 0103 R			jae	vh_fail			;  N: return invalid handle error
 00F0  C1 E3 02				shl	bx,2			;  Y: BX = handle's table offset
 00F3  81 C3 0000 E			add	bx,offset DGROUP:_handle_table	; BX = offset to handle's data
 00F7  83 3F FF				cmp	[bx.ht_index],NULL_PAGE	;Q: is this an active handle ?
 00FA  0F 84 0103 R			je	vh_fail			;    N: return invalid handle error
 00FE  8B C3				mov	ax,bx			;    Y: return ptr to handle's data
				;
 0100				vh_exit:
 0100  5B				pop	bx
 0101  5D				pop	bp
 0102  C3				ret
 0103				vh_fail:
 0103  C6 46 1D 83			mov	byte ptr [bp.rAX+1],INVALID_HANDLE	; set AH on stack
 0107  B8 0FFF				mov	ax,NULL_HANDLE		; return NULL_HANDLE to caller
 010A  EB F4				jmp	short vh_exit
				
				;
 010C				_valid_handle	endp
				
				;***********************************************
				;
				; flush_tlb:
				;
				; no params, no return value, uses eax
				;
				; flush the Translation Look-Aside Buffer
				;
				; 05/09/88  ISP   Shifted in from WIN386
				;***********************************************
 010C				_flush_tlb	proc	near
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-16


				public	_flush_tlb
 010C  0F 20 D8				mov	eax, cr3
 010F  0F 22 D8				mov	cr3, eax
 0112  C3				ret
 0113				_flush_tlb	endp
				
				;***********************************************
				;
				;   _Names_Match
				;
				;   Returns a boolean value (0 = false, FFFF = True) if 2 handle names match
				;
				; uses:
				;	cx, ax
				;
				; 05/09/88  ISP   Shifted in from WIN386 and modified for 16 bit ptrs
				;***********************************************
 = 0004				name1	=	4
 = 0006				name2	=	6
					public	_Names_Match
 0113				_Names_Match proc    near
 0113  55				push	bp		; entry prolog
 0114  8B EC				mov	bp,sp
 0116  57				push	di		; reg var
 0117  56				push	si		; reg var
				
 0118  8C D8				mov	ax,ds		; initialise es segment to
 011A  8E C0				mov	es,ax		; DGROUP
				
 011C  33 C0				xor	ax, ax	; Assume it did NOT work
				
 011E  8B 7E 04				mov	di, word ptr [bp+name1]	; First name
 0121  8B 76 06				mov	si, word ptr [bp+name2]	; Second name
 0124  FC				cld
 0125  B9 0002				mov	cx, 2				; Compare 2 dwords
 0128  F3/ 66| A7			rep 	cmpsd		; do it
 012B  75 02				jne	SHORT Names_Dont_Match
 012D  F7 D0				not	ax		; They match!
				
 012F				Names_Dont_Match:
 012F  5E				pop	si		; restore reg var
 0130  5F				pop	di		; restore reg var
 0131  5D				pop	bp
 0132  C3				ret
 0133				_Names_Match endp
				
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-17


					page
				;**	SetDescInfoResident - set descriptor information
				;
				;	The limit field of a specified descriptor is set.
				;	  (limit = size - 1).
				;	The base address of the specified descriptor is set.
				;	The access field of the specified descriptor is set.
				;
				;	ENTRY	BX = selector
				;		ES:0 = descriptor table to use
				;		CX = limit
				;		AL, DX = 24 bit base address
				;		AH = access rights byte
				;	EXIT	None
				;	USES	Flags, other regs preserved
				;
				;	WARNING This code only works on a 286. It can be called in
				;		either mode.
				
 0133				SetDescInfoResident proc near
 0133  53				push	bx			; save selector
 0134  80 E3 F8				and	bl,SEL_LOW_MASK
				
				;	fill in the limit field
				
 0137  26: 89 0F			mov	es:[bx],cx
				
				;	fill in base address
				
 013A  26: 89 57 02			mov	es:[bx + 2],dx
 013E  26: 88 47 04			mov	es:[bx + 4],al
				
				;	fill in access rights byte
				
 0142  26: 88 67 05			mov	es:[bx + 5],ah
 0146  5B				pop	bx
 0147  C3				ret
 0148				SetDescInfoResident endp
				
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Page     1-18


					page
				;**	SegOffTo24Resident - convert seg:off to 24 bit physical address
				;
				;	The specified real mode segment:offset is converted to
				;	a 24 bit physical address.
				;
				;	ENTRY	AX = segment
				;		DX = offset
				;	EXIT	AL, DX = 24 bit physical address
				;	USES	AH, Flags, other regs preserved.
				;
				;	WARNING This code only works on a 286. It can be called in
				;		either mode.
				
 0148				SegOffTo24Resident proc near
 0148  51				push	cx
				
				;	Convert AX:DX into 24 bit addr in AL, DX
				
 0149  8A EC				mov	ch,ah
 014B  C1 E0 04				shl	ax,4
 014E  C0 ED 04				shr	ch,4			; CH = high byte
 0151  03 D0				add	dx,ax			; DX = low word
 0153  8A C5				mov	al,ch			; AL = high byte
 0155  14 00				adc	al,0			; propagate cy from low word
				
 0157  59				pop	cx
 0158  C3				ret
 0159				SegOffTo24Resident endp
				
 0159				_TEXT	ENDS
				END

Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Symbols-1


Macros:

		N a m e			Lines

DWORD_ALIGN  . . . . . . . . . .  	   4
GDT_ENTRY  . . . . . . . . . . .  	   5
HANDLE2HANDLEPTR . . . . . . . .  	   2
IDT_ENTRY  . . . . . . . . . . .  	   5
LDT_ENTRY  . . . . . . . . . . .  	   5
PAGE_ENTRY . . . . . . . . . . .  	   2
VALIDATE_HANDLE  . . . . . . . .  	   8

Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

DESC . . . . . . . . . . . . . .  	0008	0006
  LIMIT  . . . . . . . . . . . .  	0000
  BASE_LOW . . . . . . . . . . .  	0002
  BASE_HIGH  . . . . . . . . . .  	0004
  RIGHTS . . . . . . . . . . . .  	0005
  RES386 . . . . . . . . . . . .  	0006
  BASE_XHI . . . . . . . . . . .  	0007
FRS_STRUC  . . . . . . . . . . .  	0052	0002
  FRS_WINDOW . . . . . . . . . .  	0000
  FRS_ALLOC  . . . . . . . . . .  	0050
GPPM_STRUC . . . . . . . . . . .  	0004	0002
  GPPM_COUNT . . . . . . . . . .  	0000
  GPPM_SEGS  . . . . . . . . . .  	0002
HANDLETABLE_STRUC  . . . . . . .  	0004	0002
  HT_INDEX . . . . . . . . . . .  	0000
  HT_COUNT . . . . . . . . . . .  	0002
LOG_PHYS_MAP_STRUCT  . . . . . .  	0004	0002
  LOG_PAGE_NUMBER  . . . . . . .  	0000
  PHYS_PAGE_NUMBER_SEG . . . . .  	0002
MAC_STRUCT . . . . . . . . . . .  	0016	0006
  MAC_TARGET_ADDRESS . . . . . .  	0000
  MAC_NEW_PAGE_MAP_LEN . . . . .  	0004
  MAC_NEW_MAP_ADDRESS  . . . . .  	0005
  MAC_OLD_PAGE_MAP_LEN . . . . .  	0009
  MAC_OLD_MAP_ADDRESS  . . . . .  	000A
  MAC_RESERVED . . . . . . . . .  	000E
MAJ_STRUCT . . . . . . . . . . .  	0009	0003
  MAJ_TARGET_ADDRESS . . . . . .  	0000
  MAJ_LOG_PHYS_MAP_LEN . . . . .  	0004
  MAJ_MAP_ADDRESS  . . . . . . .  	0005
MAPPABLE_PAGE  . . . . . . . . .  	0004	0002
  MAPPABLE_SEG . . . . . . . . .  	0000
  MAPPABLE_PG  . . . . . . . . .  	0002
MEM_MEMORY_DESCRIPTOR_STRUCT . .  	0007	0004
  MEM_MEMORY_TYPE  . . . . . . .  	0000
  MEM_HANDLE . . . . . . . . . .  	0001
  MEM_INITIAL_OFFSET . . . . . .  	0003
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Symbols-2


  MEM_INITIAL_SEG_PAGE . . . . .  	0005
MEM_STRUCT . . . . . . . . . . .  	0012	0003
  MEM_REGION_LENGTH  . . . . . .  	0000
  MEM_SOURCE . . . . . . . . . .  	0004
  MEM_DEST . . . . . . . . . . .  	000B
MHA_ARRAY0 . . . . . . . . . . .  	0004	0002
  MHA0_LOG_PG  . . . . . . . . .  	0000
  MHA0_PHYS_PG . . . . . . . . .  	0002
MHA_ARRAY1 . . . . . . . . . . .  	0004	0002
  MHA1_LOG_PG  . . . . . . . . .  	0000
  MHA1_SEG . . . . . . . . . . .  	0002
R67_FRAME  . . . . . . . . . . .  	002E	000F
  RDI  . . . . . . . . . . . . .  	0000
  RSI  . . . . . . . . . . . . .  	0004
  RBP  . . . . . . . . . . . . .  	0008
  RSP  . . . . . . . . . . . . .  	000C
  RBX  . . . . . . . . . . . . .  	0010
  RDX  . . . . . . . . . . . . .  	0014
  RCX  . . . . . . . . . . . . .  	0018
  RAX  . . . . . . . . . . . . .  	001C
  RETADDR  . . . . . . . . . . .  	0020
  RCS  . . . . . . . . . . . . .  	0022
  PFLAG  . . . . . . . . . . . .  	0024
  RDS  . . . . . . . . . . . . .  	0026
  RES  . . . . . . . . . . . . .  	0028
  RGS  . . . . . . . . . . . . .  	002A
  RFS  . . . . . . . . . . . . .  	002C
SAVEMAP_STRUC  . . . . . . . . .  	000A	0002
  S_HANDLE . . . . . . . . . . .  	0000
  S_MAP  . . . . . . . . . . . .  	0002
TSS286STRUC  . . . . . . . . . .  	002C	0016
  TSS286_BACKLINK  . . . . . . .  	0000
  TSS286_SP0 . . . . . . . . . .  	0002
  TSS286_SS0 . . . . . . . . . .  	0004
  TSS286_SP1 . . . . . . . . . .  	0006
  TSS286_SS1 . . . . . . . . . .  	0008
  TSS286_SP2 . . . . . . . . . .  	000A
  TSS286_SS2 . . . . . . . . . .  	000C
  TSS286_IP  . . . . . . . . . .  	000E
  TSS286_FLAGS . . . . . . . . .  	0010
  TSS286_AX  . . . . . . . . . .  	0012
  TSS286_CX  . . . . . . . . . .  	0014
  TSS286_DX  . . . . . . . . . .  	0016
  TSS286_BX  . . . . . . . . . .  	0018
  TSS286_SP  . . . . . . . . . .  	001A
  TSS286_BP  . . . . . . . . . .  	001C
  TSS286_SI  . . . . . . . . . .  	001E
  TSS286_DI  . . . . . . . . . .  	0020
  TSS286_ES  . . . . . . . . . .  	0022
  TSS286_CS  . . . . . . . . . .  	0024
  TSS286_SS  . . . . . . . . . .  	0026
  TSS286_DS  . . . . . . . . . .  	0028
  TSS286_LDT . . . . . . . . . .  	002A
TSS386STRUC  . . . . . . . . . .  	0068	0027
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Symbols-3


  TSS386_BACKLINK  . . . . . . .  	0000
  TSS386_UNUSED1 . . . . . . . .  	0002
  TSS386_ESP0LO  . . . . . . . .  	0004
  TSS386_ESP0HI  . . . . . . . .  	0006
  TSS386_SS0 . . . . . . . . . .  	0008
  TSS386_UNUSED2 . . . . . . . .  	000A
  TSS386_ESP1  . . . . . . . . .  	000C
  TSS386_SS1 . . . . . . . . . .  	0010
  TSS386_UNUSED3 . . . . . . . .  	0012
  TSS386_ESP2  . . . . . . . . .  	0014
  TSS386_SS2 . . . . . . . . . .  	0018
  TSS386_UNUSED4 . . . . . . . .  	001A
  TSS386_CR3 . . . . . . . . . .  	001C
  TSS386_EIP . . . . . . . . . .  	0020
  TSS386_EFLAGS  . . . . . . . .  	0024
  TSS386_EAX . . . . . . . . . .  	0028
  TSS386_ECX . . . . . . . . . .  	002C
  TSS386_EDX . . . . . . . . . .  	0030
  TSS386_EBX . . . . . . . . . .  	0034
  TSS386_ESP . . . . . . . . . .  	0038
  TSS386_EBP . . . . . . . . . .  	003C
  TSS386_ESI . . . . . . . . . .  	0040
  TSS386_EDI . . . . . . . . . .  	0044
  TSS386_ES  . . . . . . . . . .  	0048
  TSS386_UNUSED5 . . . . . . . .  	004A
  TSS386_CS  . . . . . . . . . .  	004C
  TSS386_UNUSED6 . . . . . . . .  	004E
  TSS386_SS  . . . . . . . . . .  	0050
  TSS386_UNUSED7 . . . . . . . .  	0052
  TSS386_DS  . . . . . . . . . .  	0054
  TSS386_UNUSED8 . . . . . . . .  	0056
  TSS386_FS  . . . . . . . . . .  	0058
  TSS386_UNUSED9 . . . . . . . .  	005A
  TSS386_GS  . . . . . . . . . .  	005C
  TSS386_UNUSED10  . . . . . . .  	005E
  TSS386_LDT . . . . . . . . . .  	0060
  TSS386_UNUSED11  . . . . . . .  	0062
  TASKATTRIBUTES . . . . . . . .  	0064
  BITMAPBASE . . . . . . . . . .  	0066

Segments and Groups:

                N a m e         	Size	Length	 Align	Combine Class

DGROUP . . . . . . . . . . . . .  	GROUP
  _DATA  . . . . . . . . . . . .  	16 Bit	0004	WORD	PUBLIC	'DATA'
  CONST  . . . . . . . . . . . .  	16 Bit	0000	WORD	PUBLIC	'CONST'
  _BSS . . . . . . . . . . . . .  	16 Bit	0000	WORD	PUBLIC	'BSS'
GDT  . . . . . . . . . . . . . .  	16 Bit	0000	PARA	COMMON	
IDT  . . . . . . . . . . . . . .  	16 Bit	0000	PARA	COMMON	
LAST . . . . . . . . . . . . . .  	16 Bit	0000	PARA	PUBLIC	'LAST'
LDT  . . . . . . . . . . . . . .  	16 Bit	0000	PARA	COMMON	
PAGESEG  . . . . . . . . . . . .  	16 Bit	0000	PARA	PUBLIC	'PAGES'
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Symbols-4


R_CODE . . . . . . . . . . . . .  	16 Bit	0000	PARA	PUBLIC	'R_CODE'
STACK  . . . . . . . . . . . . .  	16 Bit	0000	PARA	STACK	'STACK'
TSS  . . . . . . . . . . . . . .  	16 Bit	0000	PARA	COMMON	
VDATA  . . . . . . . . . . . . .  	16 Bit	0000	WORD	PUBLIC	'VDATA'
_TEXT  . . . . . . . . . . . . .  	16 Bit	0159	BYTE	PUBLIC	'CODE'

Symbols:            

                N a m e         	Type	 Value	 Attr

ABOVE_CONV_END_PG  . . . . . . .  	NUMBER	0037	
ABOVE_CONV_END_SEG . . . . . . .  	NUMBER	DC00	
ABOVE_CONV_STRT_PG . . . . . . .  	NUMBER	0030	
ABOVE_CONV_STRT_SEG  . . . . . .  	NUMBER	C000	
ACCESS_DENIED  . . . . . . . . .  	NUMBER	00A4	

BACKWARD_COPY_FLAG . . . . . . .  	NUMBER	0020	

CLEAR_IOPL . . . . . . . . . . .  	NUMBER	CFFF	
COLOUR_GSEL  . . . . . . . . . .  	NUMBER	0068	
CONVENTIONAL_EMM_OVERLAP . . . .  	NUMBER	0094	
CONV_STRT_PG . . . . . . . . . .  	NUMBER	0010	
CONV_STRT_SEG  . . . . . . . . .  	NUMBER	4000	
COUNT  . . . . . . . . . . . . .  	NUMBER	0008	
CR . . . . . . . . . . . . . . .  	NUMBER	000D	

DA_EXIT  . . . . . . . . . . . .  	L NEAR	0072	_TEXT
DA_PM  . . . . . . . . . . . . .  	L NEAR	0051	_TEXT
DEB1_GSEL  . . . . . . . . . . .  	NUMBER	0088	
DEB2_GSEL  . . . . . . . . . . .  	NUMBER	0090	
DEB3_GSEL  . . . . . . . . . . .  	NUMBER	0098	
DEB4_GSEL  . . . . . . . . . . .  	NUMBER	00A0	
DEB5_GSEL  . . . . . . . . . . .  	NUMBER	00A8	
DEBX_GSEL  . . . . . . . . . . .  	NUMBER	00B0	
DESTPTR  . . . . . . . . . . . .  	NUMBER	0006	
DUPLICATE_HANDLE_NAME  . . . . .  	NUMBER	00A1	
D_386CALL_GATE . . . . . . . . .  	NUMBER	000C	
D_386INT0  . . . . . . . . . . .  	NUMBER	008E	
D_386INT3  . . . . . . . . . . .  	NUMBER	00EE	
D_386INT_GATE  . . . . . . . . .  	NUMBER	000E	
D_386TRAP_GATE . . . . . . . . .  	NUMBER	000F	
D_386TSS . . . . . . . . . . . .  	NUMBER	0009	
D_386TSS0  . . . . . . . . . . .  	NUMBER	0089	
D_ACCESSED . . . . . . . . . . .  	NUMBER	0001	
D_BUSY386TSS . . . . . . . . . .  	NUMBER	000B	
D_B_BIT  . . . . . . . . . . . .  	NUMBER	0040	
D_CALLGATE . . . . . . . . . . .  	NUMBER	0004	
D_CODE . . . . . . . . . . . . .  	NUMBER	0008	
D_CODE0  . . . . . . . . . . . .  	NUMBER	009A	
D_CODE3  . . . . . . . . . . . .  	NUMBER	00FA	
D_CONFORM  . . . . . . . . . . .  	NUMBER	0004	
D_CTRL . . . . . . . . . . . . .  	NUMBER	0000	
D_DATA . . . . . . . . . . . . .  	NUMBER	0000	
D_DATA0  . . . . . . . . . . . .  	NUMBER	0092	
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Symbols-5


D_DATA3  . . . . . . . . . . . .  	NUMBER	00F2	
D_DPL0 . . . . . . . . . . . . .  	NUMBER	0000	
D_DPL1 . . . . . . . . . . . . .  	NUMBER	0020	
D_DPL2 . . . . . . . . . . . . .  	NUMBER	0040	
D_DPL3 . . . . . . . . . . . . .  	NUMBER	0060	
D_EXPDN  . . . . . . . . . . . .  	NUMBER	0004	
D_GATE3  . . . . . . . . . . . .  	NUMBER	00E4	
D_INT0 . . . . . . . . . . . . .  	NUMBER	0086	
D_INT3 . . . . . . . . . . . . .  	NUMBER	00E6	
D_INTGATE  . . . . . . . . . . .  	NUMBER	0006	
D_LDT  . . . . . . . . . . . . .  	NUMBER	0002	
D_LDT0 . . . . . . . . . . . . .  	NUMBER	0082	
D_NOTPRES  . . . . . . . . . . .  	NUMBER	0000	
D_PRES . . . . . . . . . . . . .  	NUMBER	0080	
D_R  . . . . . . . . . . . . . .  	NUMBER	0000	
D_RX . . . . . . . . . . . . . .  	NUMBER	0002	
D_SEG  . . . . . . . . . . . . .  	NUMBER	0010	
D_TASKGATE . . . . . . . . . . .  	NUMBER	0005	
D_TRAP0  . . . . . . . . . . . .  	NUMBER	0087	
D_TRAPGATE . . . . . . . . . . .  	NUMBER	0007	
D_TSS  . . . . . . . . . . . . .  	NUMBER	0001	
D_TSS0 . . . . . . . . . . . . .  	NUMBER	0081	
D_TSS_BUSY . . . . . . . . . . .  	NUMBER	0003	
D_W  . . . . . . . . . . . . . .  	NUMBER	0002	
D_X  . . . . . . . . . . . . . .  	NUMBER	0000	

EGA1_GSEL  . . . . . . . . . . .  	NUMBER	0070	
EGA2_GSEL  . . . . . . . . . . .  	NUMBER	0078	
EMM1_GSEL  . . . . . . . . . . .  	NUMBER	0100	
EMM2_GSEL  . . . . . . . . . . .  	NUMBER	0108	
EMM32_PHYS_PAGES . . . . . . . .  	NUMBER	0004	
EMM_HW_MALFUNCTION . . . . . . .  	NUMBER	0081	
EMM_PAGE_CNT . . . . . . . . . .  	NUMBER	0800	
EMM_SW_MALFUNCTION . . . . . . .  	NUMBER	0080	

FALSE  . . . . . . . . . . . . .  	NUMBER	0000	
FRSETS_UNSUPPORTED . . . . . . .  	NUMBER	0099	
FRSET_INVALID_DMA  . . . . . . .  	NUMBER	009F	
FRSET_NON_ZERO . . . . . . . . .  	NUMBER	009C	
FRSET_NO_DMA . . . . . . . . . .  	NUMBER	009E	
FRSET_UNDEFINED  . . . . . . . .  	NUMBER	009D	
FRS_COUNT  . . . . . . . . . . .  	NUMBER	0010	

GDTD_GSEL  . . . . . . . . . . .  	NUMBER	0008	
GSPM_GET . . . . . . . . . . . .  	NUMBER	0000	
GSPM_GETSET  . . . . . . . . . .  	NUMBER	0002	
GSPM_SET . . . . . . . . . . . .  	NUMBER	0001	
GSPM_SIZE  . . . . . . . . . . .  	NUMBER	0003	

HANDLE_CNT . . . . . . . . . . .  	NUMBER	00FF	
HANDLE_NAME_NOT_FOUND  . . . . .  	NUMBER	00A0	

I386 . . . . . . . . . . . . . .  	TEXT  		
IDTD_GSEL  . . . . . . . . . . .  	NUMBER	0010	
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Symbols-6


INSUFFICIENT_EMM_PAGES . . . . .  	NUMBER	0093	
INVALID_FRSET  . . . . . . . . .  	NUMBER	009A	
INVALID_FUNCTION . . . . . . . .  	NUMBER	0084	
INVALID_HANDLE . . . . . . . . .  	NUMBER	0083	
INVALID_MEMORY_TYPE  . . . . . .  	NUMBER	0098	
INVALID_OFFSET . . . . . . . . .  	NUMBER	0095	
INVALID_REGION_LENGTH  . . . . .  	NUMBER	0096	
INVALID_SUBFUNCTION  . . . . . .  	NUMBER	008F	
INVALID_WRAPAROUND . . . . . . .  	NUMBER	00A2	

K_GETC286  . . . . . . . . . . .  	NUMBER	00C0	
K_PUTC286  . . . . . . . . . . .  	NUMBER	00B8	

LDTD_GSEL  . . . . . . . . . . .  	NUMBER	0020	
LDT_GSEL . . . . . . . . . . . .  	NUMBER	0018	
LF . . . . . . . . . . . . . . .  	NUMBER	000A	
LOADALL_GSEL . . . . . . . . . .  	NUMBER	0080	
LOG_PAGE_RANGE . . . . . . . . .  	NUMBER	008A	

MAP_PREV_SAVED . . . . . . . . .  	NUMBER	008D	
MAX_ABOVE_CONV_PAGES . . . . . .  	NUMBER	0008	
MAX_PHYS_PAGES . . . . . . . . .  	NUMBER	0028	
MBSRC_GSEL . . . . . . . . . . .  	NUMBER	00E0	
MBTAR_GSEL . . . . . . . . . . .  	NUMBER	00E8	
MONO_GSEL  . . . . . . . . . . .  	NUMBER	0060	
MSW_PROTECT  . . . . . . . . . .  	NUMBER	0001	

NAME1  . . . . . . . . . . . . .  	NUMBER	0004	
NAME2  . . . . . . . . . . . . .  	NUMBER	0006	
NAMES_DONT_MATCH . . . . . . . .  	L NEAR	012F	_TEXT
NOHIMEM  . . . . . . . . . . . .  	TEXT  		
NOT_ENOUGH_EXT_MEM . . . . . . .  	NUMBER	0087	
NOT_ENOUGH_FREE_MEM  . . . . . .  	NUMBER	0088	
NO_MAP_SAVED . . . . . . . . . .  	NUMBER	008E	
NO_MORE_FRSETS . . . . . . . . .  	NUMBER	009B	
NO_MORE_HANDLES  . . . . . . . .  	NUMBER	0085	
NULL_HANDLE  . . . . . . . . . .  	NUMBER	0FFF	
NULL_PAGE  . . . . . . . . . . .  	NUMBER	FFFF	
NUM_CONV_PGS . . . . . . . . . .  	NUMBER	0018	

OEM0_GSEL  . . . . . . . . . . .  	NUMBER	0110	
OEM1_GSEL  . . . . . . . . . . .  	NUMBER	0118	
OEM2_GSEL  . . . . . . . . . . .  	NUMBER	0120	
OEM3_GSEL  . . . . . . . . . . .  	NUMBER	0128	
OK . . . . . . . . . . . . . . .  	NUMBER	0000	
OS_DISABLED  . . . . . . . . . .  	NUMBER	0002	
OS_ENABLED . . . . . . . . . . .  	NUMBER	0001	
OS_IDLE  . . . . . . . . . . . .  	NUMBER	0000	
OVERLAPPING_EXCHANGE . . . . . .  	NUMBER	0097	
OVERLAP_FLAG . . . . . . . . . .  	NUMBER	0040	

PAGET_GSEL . . . . . . . . . . .  	NUMBER	00F0	
PAGE_MAPPABLE  . . . . . . . . .  	NUMBER	00FF	
PAGE_NOT_MAPPABLE  . . . . . . .  	NUMBER	0000	
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Symbols-7


PAGE_SIZE  . . . . . . . . . . .  	NUMBER	1000	
PFLAG_PATCH_CS_IP  . . . . . . .  	NUMBER	0008	
PFLAG_VIRTUAL  . . . . . . . . .  	NUMBER	0020	
PFLAG_VM . . . . . . . . . . . .  	NUMBER	0002	
PHYS_PAGE_RANGE  . . . . . . . .  	NUMBER	008B	
P_ACC  . . . . . . . . . . . . .  	NUMBER	0010	
P_AVAIL  . . . . . . . . . . . .  	NUMBER	0007	
P_DIRTY  . . . . . . . . . . . .  	NUMBER	0020	
P_PRES . . . . . . . . . . . . .  	NUMBER	0001	
P_SIZE . . . . . . . . . . . . .  	NUMBER	1000	
P_USER . . . . . . . . . . . . .  	NUMBER	0004	
P_WRITE  . . . . . . . . . . . .  	NUMBER	0002	

RCODEA_GSEL  . . . . . . . . . .  	NUMBER	00C8	
RM_IDT_GSEL  . . . . . . . . . .  	NUMBER	0038	
ROMDATA_GSEL . . . . . . . . . .  	NUMBER	0040	
RPL_CLR  . . . . . . . . . . . .  	NUMBER	FFFFFFFC 
RPL_MASK . . . . . . . . . . . .  	NUMBER	0003	
R_AVL  . . . . . . . . . . . . .  	NUMBER	0010	
R_GRAN . . . . . . . . . . . . .  	NUMBER	0080	
R_LIMIT_XHI  . . . . . . . . . .  	NUMBER	000F	

SAVED_PAGE_DEALLOC . . . . . . .  	NUMBER	0086	
SAVE_AREA_FULL . . . . . . . . .  	NUMBER	008C	
SA_EXIT  . . . . . . . . . . . .  	L NEAR	0038	_TEXT
SA_PM  . . . . . . . . . . . . .  	L NEAR	0017	_TEXT
SegOffTo24Resident . . . . . . .  	N PROC	0148	_TEXT	Global	Length = 0011
SELECTOR_MASK  . . . . . . . . .  	NUMBER	FFF8	
SEL_LOW_MASK . . . . . . . . . .  	NUMBER	00F8	
SetDescInfoResident  . . . . . .  	N PROC	0133	_TEXT	Global	Length = 0015
SOURCE_CORRUPTED . . . . . . . .  	NUMBER	00A3	
SOURCE_GT_DEST_FLAG  . . . . . .  	NUMBER	0080	
SRCPTR . . . . . . . . . . . . .  	NUMBER	0004	
STACK0_SIZE  . . . . . . . . . .  	NUMBER	0200	
STK_SIZE . . . . . . . . . . . .  	NUMBER	4000	
SYS_IOPL . . . . . . . . . . . .  	NUMBER	3000	

TABLE_MASK . . . . . . . . . . .  	NUMBER	0004	
TAB_GDT  . . . . . . . . . . . .  	NUMBER	0000	
TAB_LDT  . . . . . . . . . . . .  	NUMBER	0004	
TOT_PHYS_PAGES . . . . . . . . .  	NUMBER	0040	
TRUE . . . . . . . . . . . . . .  	NUMBER	FFFFFFFF 
TSSD_GSEL  . . . . . . . . . . .  	NUMBER	0030	
TSS_GSEL . . . . . . . . . . . .  	NUMBER	0028	

USER1_GSEL . . . . . . . . . . .  	NUMBER	0130	

VALID_OVERLAP  . . . . . . . . .  	NUMBER	0092	
VDMCA_GSEL . . . . . . . . . . .  	NUMBER	00F8	
VDMC_GSEL  . . . . . . . . . . .  	NUMBER	0048	
VDMD_GSEL  . . . . . . . . . . .  	NUMBER	0050	
VDMS_GSEL  . . . . . . . . . . .  	NUMBER	0058	
VH_EXIT  . . . . . . . . . . . .  	L NEAR	0100	_TEXT
VH_FAIL  . . . . . . . . . . . .  	L NEAR	0103	_TEXT
Microsoft (R) Macro Assembler Version 5.10                  5/17/24 09:44:41
EMMSUP - EMM support routines                               Symbols-8


VM1_GSEL . . . . . . . . . . . .  	NUMBER	00D0	
VM2_GSEL . . . . . . . . . . . .  	NUMBER	00D8	

ZERO_PAGES . . . . . . . . . . .  	NUMBER	0089	

@CPU . . . . . . . . . . . . . .  	TEXT  3471		
@FILENAME  . . . . . . . . . . .  	TEXT  emmsup		
@VERSION . . . . . . . . . . . .  	TEXT  510		
_copyin  . . . . . . . . . . . .  	N PROC	0089	_TEXT	Global	Length = 0019
_copyout . . . . . . . . . . . .  	N PROC	0074	_TEXT	Global	Length = 0015
_dest_addr . . . . . . . . . . .  	N PROC	003A	_TEXT	Global	Length = 003A
_emm_page  . . . . . . . . . . .  	V WORD	0000	_DATA	External
_flush_tlb . . . . . . . . . . .  	N PROC	010C	_TEXT	Global	Length = 0007
_handle_table  . . . . . . . . .  	V WORD	0000	_DATA	External
_handle_table_size . . . . . . .  	V WORD	0000	_DATA	External
_Names_Match . . . . . . . . . .  	N PROC	0113	_TEXT	Global	Length = 0020
_page_frame_base . . . . . . . .  	V DWORD	0000	_DATA	External
_pft386  . . . . . . . . . . . .  	V WORD	0000	_DATA	External
_regp  . . . . . . . . . . . . .  	V WORD	0000	_DATA	External
_save_map  . . . . . . . . . . .  	V BYTE	0000	_DATA	External
_source_addr . . . . . . . . . .  	N PROC	0000	_TEXT	Global	Length = 003A
_total_pages . . . . . . . . . .  	V WORD	0000	_DATA	External
_valid_handle  . . . . . . . . .  	N PROC	00DF	_TEXT	Global	Length = 002D
_wcopy . . . . . . . . . . . . .  	N PROC	00A2	_TEXT	Global	Length = 0019
_wcopyb  . . . . . . . . . . . .  	N PROC	00BB	_TEXT	Global	Length = 0024
__acrtused . . . . . . . . . . .  	L DWORD	0000	_DATA	Global


   1580 Source  Lines
   1580 Total   Lines
    368 Symbols

  46390 + 152505 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
