2 TITLE DOS
- GRAPHICS Command
- Interrupt 2FH Driver
;AN000;
4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000;
5 ;; DOS - GRAPHICS Command
6 ;; (C) Copyright 1988 Microsoft
8 ;; File Name: GRINT2FH.ASM ;AN000;
11 ;; Description: ;AN000;
12 ;; ------------ ;AN000;
13 ;; This file contains the Interrupt 2FH driver. ;AN000;
15 ;; Documentation Reference: ;AN000;
16 ;; ------------------------ ;AN000;
17 ;; OASIS High Level Design ;AN000;
18 ;; OASIS GRAPHICS I1 Overview ;AN000;
20 ;; Procedures Contained in This File: ;AN000;
21 ;; ---------------------------------- ;AN000;
22 ;; INT_2FH_DRIVER - Interrupt 2FH driver ;AN000;
24 ;; Include Files Required: ;AN000;
25 ;; ----------------------- ;AN000;
26 ;; GRLOAD.EXT - Externals for profile load ;AN000;
27 ;; GRCTRL.EXT - Externals for print screen control ;AN000;
28 ;; GRPRINT.EXT - Externals for print modules ;AN000;
29 ;; GRCPSD.EXT - Externals for COPY_SHARED_DATA module ;AN000;
31 ;; External Procedure References: ;AN000;
32 ;; ------------------------------ ;AN000;
33 ;; Calls next Int 2FH handler in the chain. ;AN000;
35 ;; Linkage Instructions: ;AN000;
36 ;; -------------------- ;AN000;
37 ;; Refer to GRAPHICS.ASM ;AN000;
39 ;; Change History: ;AN000;
40 ;; --------------- ;AN000;
43 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000;
46 CODE SEGMENT PUBLIC 'CODE' ;; ;AN000;
47 ASSUME
CS:CODE,DS:CODE ;; ;AN000;
49 PUBLIC OLD_INT_2FH
;; ;AN000;
50 PUBLIC INT_2FH_DRIVER
;; ;AN000;
51 PUBLIC PRT_SCR_2FH_NUMBER
;; ;AN000;
52 PUBLIC RESIDENT_CODE_SEG
;; ;AN000;
53 PUBLIC SHARED_DATA_AREA_PTR
;; ;AN000;
57 INCLUDE STRUC.INC ;AN000;
58 INCLUDE GRINST
.EXT
;AN000;
59 INCLUDE GRCTRL
.EXT
;AN000;
60 INCLUDE GRCPSD
.EXT
;AN000;
62 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000;
64 ;; Module: INT_2FH_DRIVER ;AN000;
66 ;; Description: ;AN000;
67 ;; Respond to GRAPHICS Int 2FH calls. ;AN000;
68 ;; The following calls are handled: ;AN000;
70 ;; AL = 0 รน Install Check ;AN000;
72 ;; Invoked By: ;AN000;
73 ;; INT 2FH instruction. ;AN000;
75 ;; Modules Called: ;AN000;
76 ;; Lower level INT 2FH handlers. ;AN000;
78 ;; Input Registers: ;AN000;
79 ;; Install Check - AH=15H AL=0 ;AN000;
82 ;; Output Registers: ;AN000;
83 ;; Install Check: IF GRAPHICS installed ;AN000;
84 ;; AH=FFH AL=FFH ;AN000;
85 ;; ES : DI points to Shared Data Area ;AN000;
87 ;; AH=15H AL=0 ;AN000;
90 ;; IF AH=15H THEN ;AN000;
91 ;; IF AL=0 THEN ;AN000;
92 ;; AH,AL := -1 ;AN000;
93 ;; ES : DI := SHARED_DATA_AREA_PTR ;AN000;
97 ;; IF OLD_INT_2FH is a valid pointer THEN ;AN000;
98 ;; Jump to Old Int 2FH ;AN000;
104 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000;
106 INT_2FH_DRIVER PROC
NEAR ;AN000;
108 PRT_SCR_2FH_NUMBER EQU 15H
; 2FH Multiplex interrupt number ;AN000;
109 ; assigned to Print Screen. ;AN000;
110 OLD_INT_2FH
DD ?
; Pointer to next 2FH interrupt handler ;AN000;
111 RESIDENT_CODE_SEG
DW ?
; Segment for installed stuff ;AN000;
112 SHARED_DATA_AREA_PTR
DW ?
; Offset of the start of the ;AN000;
113 ; Shared Data Area ;AN000;
116 ;-------------------------------------------------------------------------------;AN000;
117 ; Verify if the 2FH Interrupt call is for our interrupt handler: ;AN000;
118 ;-------------------------------------------------------------------------------;AN000;
119 .IF <AH EQ PRT_SCR_2FH_NUMBER
> AND;If 2FH call is for us ;AN000;
120 .IF <ZERO
AL> ; and request is "Get install state" ;AN000;
121 .THEN
; then, ;AN000;
122 ;-------------------------------------------------------------------------------;AN000;
123 ; Yes: return results ;AN000;
124 ;-------------------------------------------------------------------------------;AN000;
125 MOV DI,CS:SHARED_DATA_AREA_PTR
; ES:DI := Pointer to shared ;AN000;
126 PUSH CS:RESIDENT_CODE_SEG
; data area ;AN000;
128 MOV AH,0FFH ; AL and AH := "We are installed" ;AN000;
130 IRET ; Return to interrupted process ;AN000;
131 ;-------------------------------------------------------------------------------;AN000;
132 ; No, pass control to next 2FH interrupt handler: ;AN000;
133 ;-------------------------------------------------------------------------------;AN000;
134 .ELSE ; else, this call is not for us: ;AN000;
135 .IF <<WORD PTR CS:OLD_INT_2FH
> NE
0> AND ;if there is another ;AN000;
136 .IF <<WORD PTR CS:OLD_INT_2FH
+2> NE
0> ; 2FH driver ;AN000;
137 .THEN
; below us then, ;AN000;
138 JMP CS:OLD_INT_2FH
; pass control to it ;AN000;
139 .ELSE ; else, there is nobody to pass ;AN000;
140 IRET ; control to, just return. ;AN000;
141 .ENDIF
; END If there is a driver below us.;AN000;
142 .ENDIF
; END If this call is for us. ;AN000;
143 INT_2FH_DRIVER ENDP
;AN000;