Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:34
DOS - GRAPHICS Command  -	Interrupt 2FH Driver		;AN000;     Page     1-1


					PAGE	,132								;AN000;
					TITLE	DOS - GRAPHICS Command  -	Interrupt 2FH Driver		;AN000;
														;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
				;; DOS - GRAPHICS Command
				;; (C) Copyright 1988 Microsoft
				;;										;AN000;
				;; File Name:  GRINT2FH.ASM							;AN000;
				;; ----------									;AN000;
				;;										;AN000;
				;; Description: 								;AN000;
				;; ------------ 								;AN000;
				;;	 This file contains the Interrupt 2FH driver.				;AN000;
				;;										;AN000;
				;; Documentation Reference:							;AN000;
				;; ------------------------							;AN000;
				;;	 OASIS High Level Design						;AN000;
				;;	 OASIS GRAPHICS I1 Overview						;AN000;
				;;										;AN000;
				;; Procedures Contained in This File:						;AN000;
				;; ----------------------------------						;AN000;
				;;	 INT_2FH_DRIVER - Interrupt 2FH driver					;AN000;
				;;										;AN000;
				;; Include Files Required:							;AN000;
				;; -----------------------							;AN000;
				;;	 GRLOAD.EXT - Externals for profile load				;AN000;
				;;	 GRCTRL.EXT - Externals for print screen control			;AN000;
				;;	 GRPRINT.EXT - Externals for print modules				;AN000;
				;;	 GRCPSD.EXT - Externals for COPY_SHARED_DATA module			;AN000;
				;;										;AN000;
				;; External Procedure References:						;AN000;
				;; ------------------------------						;AN000;
				;;	 Calls next Int 2FH handler in the chain.				;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;
								       ;;					;AN000;
					PUBLIC	OLD_INT_2FH	       ;;					;AN000;
					PUBLIC	INT_2FH_DRIVER	       ;;					;AN000;
					PUBLIC	PRT_SCR_2FH_NUMBER     ;;					;AN000;
					PUBLIC	RESIDENT_CODE_SEG      ;;					;AN000;
					PUBLIC	SHARED_DATA_AREA_PTR   ;;					;AN000;
								       ;;					;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:34
DOS - GRAPHICS Command  -	Interrupt 2FH Driver		;AN000;     Page     1-2


								       ;;					;AN000;
			     C	.LIST										;AN000;
				INCLUDE GRCTRL.EXT								;AN000;
			     C	PAGE	,132
			     C	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
			     C	;; DOS - GRAPHICS Command
			     C	;; (C) Copyright 1988 Microsoft
			     C	;;										;AN000;
			     C	;; File Name:  GRCTRL.EXT							;AN000;
			     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 GRCPSD.EXT								;AN000;
			     C	.LIST										;AN000;
				.LIST										;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:34
DOS - GRAPHICS Command  -	Interrupt 2FH Driver		;AN000;     Page     1-3


				;;										;AN000;
				;; Module: INT_2FH_DRIVER							;AN000;
				;;										;AN000;
				;; Description: 								;AN000;
				;;     Respond to GRAPHICS Int 2FH calls.					;AN000;
				;;     The following calls are handled: 					;AN000;
				;;										;AN000;
				;;	AL = 0 ù Install Check							;AN000;
				;;										;AN000;
				;; Invoked By:									;AN000;
				;;     INT 2FH instruction.							;AN000;
				;;										;AN000;
				;; Modules Called:								;AN000;
				;;     Lower level INT 2FH handlers.						;AN000;
				;;										;AN000;
				;; Input Registers:								;AN000;
				;;     Install Check - AH=15H  AL=0						;AN000;
				;;										;AN000;
				;;										;AN000;
				;; Output Registers:								;AN000;
				;;     Install Check:  IF GRAPHICS installed					;AN000;
				;;			  AH=FFH  AL=FFH					;AN000;
				;;			  ES : DI points to Shared Data Area			;AN000;
				;;		       ELSE							;AN000;
				;;			  AH=15H  AL=0						;AN000;
				;;										;AN000;
				;; Logic:									;AN000;
				;;     IF AH=15H THEN								;AN000;
				;;	  IF AL=0 THEN								;AN000;
				;;	     AH,AL := -1							;AN000;
				;;	     ES : DI := SHARED_DATA_AREA_PTR					;AN000;
				;;	  ENDIF 								;AN000;
				;;	  IRET									;AN000;
				;;     ELSE									;AN000;
				;;	  IF OLD_INT_2FH is a valid pointer THEN				;AN000;
				;;	      Jump to Old Int 2FH						;AN000;
				;;	  ELSE									;AN000;
				;;	      IRET								;AN000;
				;;	  ENDIF 								;AN000;
				;;     ENDIF									;AN000;
				;;										;AN000;
				;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;					;AN000;
														;AN000;
 0000				INT_2FH_DRIVER	PROC  NEAR							;AN000;
 0000  EB 09 90				JMP	INT_2FH 							;AN000;
 = 0015				PRT_SCR_2FH_NUMBER EQU		15H	; 2FH Multiplex interrupt number	;AN000;
									;  assigned to Print Screen.		;AN000;
 0003  00000000			OLD_INT_2FH	DD    ? 		; Pointer to next 2FH interrupt handler ;AN000;
 0007  0000			RESIDENT_CODE_SEG	DW   ?	; Segment for installed stuff			;AN000;
 0009  0000			SHARED_DATA_AREA_PTR	DW   ?	; Offset of the start of the			;AN000;
								;  Shared Data Area				;AN000;
														;AN000;
 000B				INT_2FH:									;AN000;
				;-------------------------------------------------------------------------------;AN000;
Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:34
DOS - GRAPHICS Command  -	Interrupt 2FH Driver		;AN000;     Page     1-4


				; Verify if the 2FH Interrupt call is for our interrupt handler:		;AN000;
				;-------------------------------------------------------------------------------;AN000;
				       .IF <AH EQ PRT_SCR_2FH_NUMBER> AND;If 2FH call is for us 		;AN000;
 000B  80 FC 15              3						cmp AH,PRT_SCR_2FH_NUMBER 
 000E  75 16                 6						jne $l2 
				       .IF <ZERO AL>			;  and request is "Get install state"   ;AN000;
 0010  0A C0                 3						or AL,AL 
 0012  75 12                 6						jnz $l2 
				       .THEN				; then, 				;AN000;
				;-------------------------------------------------------------------------------;AN000;
				; Yes: return results								;AN000;
				;-------------------------------------------------------------------------------;AN000;
 0014  2E: 8B 3E 0009 R			MOV	DI,CS:SHARED_DATA_AREA_PTR ;  ES:DI :=	Pointer to shared	;AN000;
 0019  2E: FF 36 0007 R			PUSH	CS:RESIDENT_CODE_SEG	   ;		 data area		;AN000;
 001E  07				POP	ES			;					;AN000;
 001F  B4 FF				MOV	AH,0FFH 		; AL and AH := "We are installed"       ;AN000;
 0021  8A C4				MOV	AL,AH			;					;AN000;
 0023  CF				IRET				; Return to interrupted process 	;AN000;
				;-------------------------------------------------------------------------------;AN000;
				; No, pass control to next 2FH interrupt handler:				;AN000;
				;-------------------------------------------------------------------------------;AN000;
				       .ELSE				; else, this call is not for us:	;AN000;
 0024  EB 18                 3						jmp short $l1 
 0026                        2	$l2: 
					 .IF <<WORD PTR CS:OLD_INT_2FH> NE 0> AND ;if there is another		;AN000;
 0026  2E: 83 3E 0003 R 00   3						cmp WORD PTR CS:OLD_INT_2FH,0 
 002C  74 0F                 6						je $l6 
					 .IF <<WORD PTR CS:OLD_INT_2FH+2> NE 0> ;  2FH driver			;AN000;
 002E  2E: 83 3E 0005 R 00   3						cmp WORD PTR CS:OLD_INT_2FH+2,0 
 0034  74 07                 6						je $l6 
					 .THEN				;	below us then,			;AN000;
 0036  2E: FF 2E 0003 R			    JMP CS:OLD_INT_2FH		;	  pass control to it		;AN000;
					 .ELSE				;	else, there is nobody to pass	;AN000;
 003B  EB 01                 3						jmp short $l1 
 003D                        2	$l6: 
 003D  CF				    IRET			;	  control to, just return.	;AN000;
					 .ENDIF 			;     END If there is a driver below us.;AN000;
				      .ENDIF				;  END If this call is for us.		;AN000;
 003E                        2	$l1: 
 003E				INT_2FH_DRIVER	ENDP								;AN000;
														;AN000;
 003E				CODE   ENDS									;AN000;
				       END									;AN000;

Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:34
DOS - GRAPHICS Command  -	Interrupt 2FH Driver		;AN000;     Symbols-1


Macros:

		N a m e			Lines

.ELSE  . . . . . . . . . . . . .  	  21
.ELSEIF  . . . . . . . . . . . .  	  16
.ENDIF . . . . . . . . . . . . .  	  11
.ENDSELECT . . . . . . . . . . .  	  15
.ENDWHILE  . . . . . . . . . . .  	  10
.FOR . . . . . . . . . . . . . .  	  23
.IF  . . . . . . . . . . . . . .  	  13
.LEAVE . . . . . . . . . . . . .  	   1
.LOOP  . . . . . . . . . . . . .  	  12
.NEXT  . . . . . . . . . . . . .  	  20
.OTHERWISE . . . . . . . . . . .  	  21
.REPEAT  . . . . . . . . . . . .  	   9
.SELECT  . . . . . . . . . . . .  	   4
.THEN  . . . . . . . . . . . . .  	   6
.UNTIL . . . . . . . . . . . . .  	   1
.WHEN  . . . . . . . . . . . . .  	  24
.WHILE . . . . . . . . . . . . .  	  14

Segments and Groups:

                N a m e         	Length	 Align	Combine Class

CODE . . . . . . . . . . . . . .  	003E	PARA	PUBLIC	'CODE'

Symbols:            

                N a m e         	Type	 Value	 Attr

BIOS_INT_5H  . . . . . . . . . .  	V WORD	0000	CODE	External
BOX_H  . . . . . . . . . . . . .  	V BYTE	0000	CODE	External
BOX_W  . . . . . . . . . . . . .  	V BYTE	0000	CODE	External

COPY_SHARED_DATA . . . . . . . .  	L NEAR	0000	CODE	External
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

DEFAULT_BOX  . . . . . . . . . .  	V BYTE	0000	CODE	External
DET_HW_CONFIG  . . . . . . . . .  	L NEAR	0000	CODE	External
DISP_ERROR . . . . . . . . . . .  	L NEAR	0000	CODE	External

ERROR_CODE . . . . . . . . . . .  	V BYTE	0000	CODE	External
ERROR_DEVICE . . . . . . . . . .  	V WORD	0000	CODE	External

GRAPHICS_INSTALL . . . . . . . .  	L NEAR	0000	CODE	External

Microsoft (R) Macro Assembler Version 5.10                  2/14/25 23:45:34
DOS - GRAPHICS Command  -	Interrupt 2FH Driver		;AN000;     Symbols-2


INSTALLED  . . . . . . . . . . .  	V BYTE	0000	CODE	External
INT_2FH  . . . . . . . . . . . .  	L NEAR	000B	CODE
INT_2FH_DRIVER . . . . . . . . .  	N PROC	0000	CODE	Global	Length = 003E

LCD_BOX  . . . . . . . . . . . .  	V BYTE	0000	CODE	External

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_FREE_BYTES  . . . . . . . . .  	V WORD	0000	CODE	External
NB_SCAN_LINES  . . . . . . . . .  	V WORD	0000	CODE	External

OLD_INT_2FH  . . . . . . . . . .  	L DWORD	0003	CODE	Global

PRINTBOX_ID_LENGTH . . . . . . .  	V BYTE	0000	CODE	External
PRINTBOX_ID_PTR  . . . . . . . .  	V WORD	0000	CODE	External
PRINTER_TYPE_LENGTH  . . . . . .  	V BYTE	0000	CODE	External
PRINTER_TYPE_PARM  . . . . . . .  	V BYTE	0000	CODE	External
PRINT_SCREEN_ALLOWED . . . . . .  	V BYTE	0000	CODE	External
PROFILE_PATH . . . . . . . . . .  	V BYTE	0000	CODE	External
PRT_BUF  . . . . . . . . . . . .  	V BYTE	0000	CODE	External
PRT_SCR  . . . . . . . . . . . .  	L NEAR	0000	CODE	External
PRT_SCR_2FH_NUMBER . . . . . . .  	NUMBER	0015		Global

RESIDENT_CODE_SEG  . . . . . . .  	L WORD	0007	CODE	Global
RESIDENT_SHARED_DATA_SIZE  . . .  	V WORD	0000	CODE	External
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
SHARED_DATA_AREA_PTR . . . . . .  	L WORD	0009	CODE	Global
STDERR . . . . . . . . . . . . .  	NUMBER	0000		Communal
STDOUT . . . . . . . . . . . . .  	NUMBER	0000		Communal
SYSDISPMSG . . . . . . . . . . .  	L NEAR	0000	CODE	External

TEMP_SHARED_DATA_PTR . . . . . .  	V WORD	0000	CODE	External

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

$L1  . . . . . . . . . . . . . .  	L NEAR	003E	CODE
$L2  . . . . . . . . . . . . . .  	L NEAR	0026	CODE
$L6  . . . . . . . . . . . . . .  	L NEAR	003D	CODE
$LL1 . . . . . . . . . . . . . .  	NUMBER	0001	
@CPU . . . . . . . . . . . . . .  	TEXT  0101h		
@FILENAME  . . . . . . . . . . .  	TEXT  grint2fh		
@VERSION . . . . . . . . . . . .  	TEXT  510		

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

DOS - GRAPHICS Command  -	Interrupt 2FH Driver		;AN000;     Symbols-3






    962 Source  Lines
   2487 Total   Lines
    177 Symbols

  46152 + 197898 Bytes symbol space free

      0 Warning Errors
      0 Severe  Errors
