Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:35
DOS GRAPHICS Command  -	Copy Shared Data                    Page     1-1


					PAGE	,132								;AN000;
					TITLE	DOS GRAPHICS Command  -	Copy Shared Data
														;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
				;; DOS - GRAPHICS Command
				;; (C) Copyright 1988 Microsoft
				;;										;AN000;
				;; File Name:  GRCPSD.ASM							;AN000;
				;; ----------									;AN000;
				;;										;AN000;
				;; Description: 								;AN000;
				;; ------------ 								;AN000;
				;;	 This file contains the COPY_SHARED_DATA module.			;AN000;
				;;										;AN000;
				;;										;AN000;
				;; Documentation Reference:							;AN000;
				;; ------------------------							;AN000;
				;;	 PLACID Functional Specifications					;AN000;
				;;	 OASIS High Level Design						;AN000;
				;;	 OASIS GRAPHICS I1 Overview						;AN000;
				;;										;AN000;
				;; Procedures Contained in This File:						;AN000;
				;; ----------------------------------						;AN000;
				;;	 COPY_SHARED_DATA - Copy the Shared Data Area from temporary		;AN000;
				;;			    build area to resident memory & exit to DOS 	;AN000;
				;;										;AN000;
				;; Include Files Required:							;AN000;
				;; -----------------------							;AN000;
				;;	 None									;AN000;
				;;										;AN000;
				;; External Procedure References:						;AN000;
				;; ------------------------------						;AN000;
				;;	 None									;AN000;
				;;										;AN000;
				;; Linkage Instructions:							;AN000;
				;; ---------------------							;AN000;
				;;	 Refer to GRAPHICS.ASM							;AN000;
				;;										;AN000;
				;; Change History:								;AN000;
				;; ---------------								;AN000;
				;;										;AN000;
				;;										;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
								       ;;					;AN000;
								       ;;					;AN000;
 0000				CODE	SEGMENT PUBLIC 'CODE'          ;;                                       ;AN000;
					ASSUME CS:CODE,DS:CODE	       ;;					;AN000;
					INCLUDE GRCTRL.EXT	       ;; Bring in external declarations	;AN000;
			     C	PAGE	,132
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
			     C	;; DOS - GRAPHICS Command
			     C	;; (C) Copyright 1988 Microsoft
			     C	;;										;AN000;
			     C	;; File Name:  GRCTRL.EXT							;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:35
DOS GRAPHICS Command  -	Copy Shared Data                    Page     1-2


			     C	;; ----------									;AN000;
			     C	;;										;AN000;
			     C	;; Description: 								;AN000;
			     C	;; ------------ 								;AN000;
			     C	;;	 Include file containing external declarations for			;AN000;
			     C	;;	 the code and data defined in GRCTRL.ASM				;AN000;
			     C	;;										;AN000;
			     C	;; Change History:								;AN000;
			     C	;; ---------------								;AN000;
			     C	;;										;AN000;
			     C	;;										;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
			     C					       ;;					;AN000;
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
			     C	EXTRN  DET_HW_CONFIG:NEAR							;AN000;
			     C	EXTRN  RGB:BYTE 								;AN000;
			     C	EXTRN  BIOS_INT_5H:WORD 							;AN000;
			     C	EXTRN  PRT_SCR:NEAR								;AN000;
			     C	EXTRN  PRINT_SCREEN_ALLOWED:BYTE						;AN000;
			     C	EXTRN  XLT_TAB:BYTE								;AN000;
			     C	EXTRN  MODE_TYPE:BYTE								;AN000;
			     C	EXTRN  CUR_MODE_PTR:WORD							;AN000;
			     C	EXTRN  CUR_MODE:BYTE								;AN000;
			     C	EXTRN  MODE_TYPE:BYTE								;AN000;
			     C	EXTRN  NB_COLORS:WORD								;AN000;
			     C	EXTRN  SCREEN_HEIGHT:WORD							;AN000;
			     C	EXTRN  SCREEN_WIDTH:WORD							;AN000;
			     C	EXTRN  NB_CHAR_COLUMNS:BYTE							;AN000;
			     C	EXTRN  CUR_PAGE:BYTE								;AN000;
			     C	EXTRN  CUR_COLUMN:WORD								;AN000;
			     C	EXTRN  CUR_ROW:WORD								;AN000;
			     C	EXTRN  NB_SCAN_LINES:WORD							;AN000;
			     C	EXTRN  SCAN_LINE_MAX_LENGTH:WORD						;AN000;
			     C	EXTRN  CUR_SCAN_LNE_LENGTH:WORD 						;AN000;
			     C	EXTRN  PRT_BUF:BYTE								;AN000;
			     C	EXTRN  NB_BOXES_PER_PRT_BUF:BYTE						;AN000;
			     C	EXTRN  CUR_BOX:BYTE								;AN000;
			     C	EXTRN  BOX_H:BYTE								;AN000;
			     C	EXTRN  BOX_W:BYTE								;AN000;
			     C	EXTRN  ERROR_CODE:BYTE								;AN000;
			     C	EXTRN  ROTATE_SW:BYTE								;AN000;
					INCLUDE GRCTRL.STR	       ;;  for transient command processing	;AN000;
			     C	.LIST										;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
			     C	;										;AN000;
			     C	; PRINT SCREEN INTERNAL ERROR CODES						;AN000;
			     C	;										;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
 = 0000                      C	NO_ERROR	EQU	0							;AN000;
 = 0001                      C	UNABLE_TO_PRINT EQU	1	; The procedure was unable to print the 	;AN000;
			     C					; screen					;AN000;
 = 0002                      C	DISPLAYMODE_INFO_NOT_FOUND EQU 2 ; There was no DISPLAYMODE info record 	;AN000;
			     C					;  in the Shared Area for the current mode	;AN000;
 = 0004                      C	MODE_NOT_SUPPORTED EQU	4	; This mode is not supported by this version	;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:35
DOS GRAPHICS Command  -	Copy Shared Data                    Page     1-3


			     C					; of GRAHICS.					;AN000;
 = 0008                      C	PRINTER_ERROR	 EQU	8	; An error occurred while printing a byte	;AN000;
			     C					;  (i.e., Out of paper, etc)			;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
			     C	;										;AN000;
			     C	; PIXEL INTERNAL REPRESENTATION 						;AN000;
			     C	;										;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
			     C	PIXEL_STR	STRUC								;AN000;
 0000  00                    C	 R	DB	?		; RED component (0 to MAX_INT)			;AN000;
 0001  00                    C	 G	DB	?		; GREEN component (0 to MAX_INT)		;AN000;
 0002  00                    C	 B	DB	?		; BLUE component (0 to MAX_INT) 		;AN000;
 0003                        C	PIXEL_STR	ENDS								;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
			     C	;										;AN000;
			     C	; VIDEO MODE TYPES								;AN000;
			     C	;										;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
 = 0000                      C	TXT		EQU	0	; Text						;AN000;
 = 0001                      C	APA		EQU	1	; All Points Addressable			;AN000;
			     C											;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
			     C	;										;AN000;
			     C	; BIOS INTERRUPT 10H CALL EQUATES						;AN000;
			     C	; Note: Either AX or AH must be initialized, depending if the call is		;AN000;
			     C	;	a sub-call or not.							;AN000;
			     C	;										;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
 = 000D                      C	READ_DOT_CALL	EQU	0DH	; Read dot					;AN000;
 = 0002                      C	SET_CURSOR_CALL EQU	02H	; Set cursor on the screen			;AN000;
 = 0003                      C	READ_CURSOR_CALL EQU	03H	; Read position of the cursor on the screen	;AN000;
 = 0008                      C	READ_CHAR_CALL	EQU	08H	; Read attribute/character			;AN000;
 = 000F                      C	GET_STATE_CALL	EQU	0FH	; Return current video state			;AN000;
 = 1007                      C	GET_P_REG_CALL	EQU	1007H	; Read a palette register (EGA, VGA)		;AN000;
 = 1015                      C	GET_C_REG_CALL	EQU	1015H	; Read a color register (VGA)			;AN000;
 = 1A00                      C	READ_CONFIG_CALL EQU	1A00H	; Read display adapter configuration (PS/2)	;AN000;
 = 101A                      C	PAGE_STATE_CALL  EQU	101AH	; Read color page state call (PS/2)		;AN000;
 = 0012                      C	ALT_SELECT_CALL EQU	12H	; Alternate select call (AH = 12h)		;AN000;
 = 0010                      C	EGA_INFO_CALL	EQU	10H	; Return EGA information (AH=12H,BH = 10H)	;AN000;
 = 0015                      C	DISP_DESC_CALL	EQU	15H	; PC CONVERTIBLE display description call	;AN000;
			     C											;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
			     C	;										;AN000;
			     C	; BIOS DATA AREA EQUATES							;AN000;
			     C	;										;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
 = 0040                      C	BIOS_SEG	EQU	40H	; BIOS segment					;AN000;
 = 0084                      C	NB_ROWS_OFFSET	EQU	84H	; Number of rows displayed when in a text mode	;AN000;
			     C											;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
			     C	;										;AN000;
			     C	; CONSTANT DEFINITIONS								;AN000;
			     C	;										;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:35
DOS GRAPHICS Command  -	Copy Shared Data                    Page     1-4


 = 0000                      C	NO		EQU	0							;AN000;
 = 0001                      C	YES		EQU	1							;AN000;
 = 0000                      C	OFF		EQU	0							;AN000;
 = 0001                      C	ON		EQU	1							;AN000;
			     C											;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
			     C	;										;AN000;
			     C	; TRANSLATION TABLE DEFINITIONS 						;AN000;
			     C	;										;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
 = 003F                      C	WHITE_INT	EQU	63	; Intensity for WHITE on the printer		;AN000;
 = 0000                      C	BLACK_INT	EQU	0	; Intensity for BLACK on the printer		;AN000;
 =                           C	MAX_INT 	EQU   WHITE_INT ; Maximum intensity for a RGB value,		;AN000;
			     C					;  (Red, Green, or Blue).			;AN000;
 = 0015                      C	ONE_THIRD	EQU MAX_INT*1/3 ; Used to calculate Red, Green, Blue intensity	;AN000;
 = 002A                      C	TWO_THIRD	EQU MAX_INT*2/3 ;  values.					;AN000;
			     C											;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
			     C	;										;AN000;
			     C	; PRINTER CONTROL ASCII CODES							;AN000;
			     C	;										;AN000;
			     C	;-------------------------------------------------------------------------------;AN000;
 = 000D                      C	CR		EQU	0DH	; Carriage return				;AN000;
 = 000A                      C	LF		EQU	0AH	; Line feed					;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
				;;										;AN000;
				;; Public Symbols								;AN000;
				;;										;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
								       ;;					;AN000;
				   PUBLIC COPY_SHARED_DATA	       ;;					;AN000;
								       ;;					;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
				;;										;AN000;
				;; Module Name: 								;AN000;
				;;   COPY_SHARED_DATA								;AN000;
				;;										;AN000;
				;; Input Parameters:								;AN000;
				;;   DS : SI - points to the Temporary Shared Data Area 			;AN000;
				;;   ES : DI - destination for resident Shared Data Area			;AN000;
				;;   BP      - offset for new Shared Data Area (same as DI)			;AN000;
				;;   AH    - Function code for exiting to DOS:					;AN000;
				;;	     31H : Terminate & Stay Resident - if first time			;AN000;
				;;	     4CH : Terminate - if already installed				;AN000;
				;;   DX    - resident data segment size in paragraphs				;AN000;
				;;										;AN000;
				;; Output Parameters:								;AN000;
				;;   NONE									;AN000;
				;;										;AN000;
				;; Data Structures Referenced:							;AN000;
				;;   Control Variables								;AN000;
				;;										;AN000;
				;; Description: 								;AN000;
				;;   Copy the Temporary Shared Data area over the installation modules		;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:35
DOS GRAPHICS Command  -	Copy Shared Data                    Page     1-5


				;;   and terminate (stay resident).  The data is copied immediately		;AN000;
				;;   following this module.							;AN000;
				;;										;AN000;
				;; Called By:									;AN000;
				;;   GRAPHICS_INSTALL								;AN000;
				;;										;AN000;
				;; External Calls:								;AN000;
				;;   NONE									;AN000;
				;;										;AN000;
				;; Logic:									;AN000;
				;;   Copy Temporary Shared Data Area						;AN000;
				;;   Set PRINT_SCREEN_ALLOWED to YES						;AN000;
				;;   Exit to DOS (Function Code 31 or 4C setup by caller)			;AN000;
				;;										;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
								       ;;					;AN000;
 0000				COPY_SHARED_DATA  PROC NEAR	       ;;					;AN000;
								       ;;					;AN000;
 0000  F3/ A4				REP	MOVSB		       ;; Copy Shared Data from temporary	;AN000;
								       ;;  build area to resident memory	;AN000;
								       ;; Allow print screens now		;AN000;
 0002  26: C6 06 0000 E 01		MOV	ES:PRINT_SCREEN_ALLOWED,YES					;AN000;
								       ;;					;AN000;
 0008  CD 21				INT	21H		       ;; Exit					;AN000;
								       ;;					;AN000;
 000A				COPY_SHARED_DATA  ENDP		       ;;					;AN000;
								       ;;					;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
 000A				CODE	ENDS									;AN000;
					END COPY_SHARED_DATA							;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:35
DOS GRAPHICS Command  -	Copy Shared Data                    Symbols-1


Structures and Records:

                N a m e                 Width   # fields
                                        Shift   Width   Mask    Initial

PIXEL_STR  . . . . . . . . . . .  	0003	0003
  R  . . . . . . . . . . . . . .  	0000
  G  . . . . . . . . . . . . . .  	0001
  B  . . . . . . . . . . . . . .  	0002

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

CODE . . . . . . . . . . . . . .  	000A	PARA	PUBLIC	'CODE'

Symbols:            

                N a m e         	Type	 Value	 Attr

ALT_SELECT_CALL  . . . . . . . .  	NUMBER	0012	
APA  . . . . . . . . . . . . . .  	NUMBER	0001	

BIOS_INT_5H  . . . . . . . . . .  	V WORD	0000	CODE	External
BIOS_SEG . . . . . . . . . . . .  	NUMBER	0040	
BLACK_INT  . . . . . . . . . . .  	NUMBER	0000	
BOX_H  . . . . . . . . . . . . .  	V BYTE	0000	CODE	External
BOX_W  . . . . . . . . . . . . .  	V BYTE	0000	CODE	External

COPY_SHARED_DATA . . . . . . . .  	N PROC	0000	CODE	Global	Length = 000A
CR . . . . . . . . . . . . . . .  	NUMBER	000D	
CUR_BOX  . . . . . . . . . . . .  	V BYTE	0000	CODE	External
CUR_COLUMN . . . . . . . . . . .  	V WORD	0000	CODE	External
CUR_MODE . . . . . . . . . . . .  	V BYTE	0000	CODE	External
CUR_MODE_PTR . . . . . . . . . .  	V WORD	0000	CODE	External
CUR_PAGE . . . . . . . . . . . .  	V BYTE	0000	CODE	External
CUR_ROW  . . . . . . . . . . . .  	V WORD	0000	CODE	External
CUR_SCAN_LNE_LENGTH  . . . . . .  	V WORD	0000	CODE	External

DET_HW_CONFIG  . . . . . . . . .  	L NEAR	0000	CODE	External
DISPLAYMODE_INFO_NOT_FOUND . . .  	NUMBER	0002	
DISP_DESC_CALL . . . . . . . . .  	NUMBER	0015	

EGA_INFO_CALL  . . . . . . . . .  	NUMBER	0010	
ERROR_CODE . . . . . . . . . . .  	V BYTE	0000	CODE	External

GET_C_REG_CALL . . . . . . . . .  	NUMBER	1015	
GET_P_REG_CALL . . . . . . . . .  	NUMBER	1007	
GET_STATE_CALL . . . . . . . . .  	NUMBER	000F	

LF . . . . . . . . . . . . . . .  	NUMBER	000A	

MAX_INT  . . . . . . . . . . . .  	ALIAS	 WHITE_INT		
MODE_NOT_SUPPORTED . . . . . . .  	NUMBER	0004	
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:35
DOS GRAPHICS Command  -	Copy Shared Data                    Symbols-2


MODE_TYPE  . . . . . . . . . . .  	V BYTE	0000	CODE	External

NB_BOXES_PER_PRT_BUF . . . . . .  	V BYTE	0000	CODE	External
NB_CHAR_COLUMNS  . . . . . . . .  	V BYTE	0000	CODE	External
NB_COLORS  . . . . . . . . . . .  	V WORD	0000	CODE	External
NB_ROWS_OFFSET . . . . . . . . .  	NUMBER	0084	
NB_SCAN_LINES  . . . . . . . . .  	V WORD	0000	CODE	External
NO . . . . . . . . . . . . . . .  	NUMBER	0000	
NO_ERROR . . . . . . . . . . . .  	NUMBER	0000	

OFF  . . . . . . . . . . . . . .  	NUMBER	0000	
ON . . . . . . . . . . . . . . .  	NUMBER	0001	
ONE_THIRD  . . . . . . . . . . .  	NUMBER	0015	

PAGE_STATE_CALL  . . . . . . . .  	NUMBER	101A	
PRINTER_ERROR  . . . . . . . . .  	NUMBER	0008	
PRINT_SCREEN_ALLOWED . . . . . .  	V BYTE	0000	CODE	External
PRT_BUF  . . . . . . . . . . . .  	V BYTE	0000	CODE	External
PRT_SCR  . . . . . . . . . . . .  	L NEAR	0000	CODE	External

READ_CHAR_CALL . . . . . . . . .  	NUMBER	0008	
READ_CONFIG_CALL . . . . . . . .  	NUMBER	1A00	
READ_CURSOR_CALL . . . . . . . .  	NUMBER	0003	
READ_DOT_CALL  . . . . . . . . .  	NUMBER	000D	
RGB  . . . . . . . . . . . . . .  	V BYTE	0000	CODE	External
ROTATE_SW  . . . . . . . . . . .  	V BYTE	0000	CODE	External

SCAN_LINE_MAX_LENGTH . . . . . .  	V WORD	0000	CODE	External
SCREEN_HEIGHT  . . . . . . . . .  	V WORD	0000	CODE	External
SCREEN_WIDTH . . . . . . . . . .  	V WORD	0000	CODE	External
SET_CURSOR_CALL  . . . . . . . .  	NUMBER	0002	

TWO_THIRD  . . . . . . . . . . .  	NUMBER	002A	
TXT  . . . . . . . . . . . . . .  	NUMBER	0000	

UNABLE_TO_PRINT  . . . . . . . .  	NUMBER	0001	

WHITE_INT  . . . . . . . . . . .  	NUMBER	003F	

XLT_TAB  . . . . . . . . . . . .  	V BYTE	0000	CODE	External

YES  . . . . . . . . . . . . . .  	NUMBER	0001	

@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  grcpsd		
@VERSION . . . . . . . . . . . .  	TEXT  510		

Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:35

DOS GRAPHICS Command  -	Copy Shared Data                    Symbols-3






    267 Source  Lines
    267 Total   Lines
     69 Symbols

  46954 + 223616 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
