diff options
| author | 2024-04-25 21:24:10 +0100 | |
|---|---|---|
| committer | 2024-04-25 22:32:27 +0000 | |
| commit | 2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch) | |
| tree | 80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/CMD/GRAPHICS/GRINT2FH.ASM | |
| parent | Merge pull request #430 from jpbaltazar/typoptbr (diff) | |
| download | ms-dos-main.tar.gz ms-dos-main.tar.xz ms-dos-main.zip | |
Diffstat (limited to 'v4.0/src/CMD/GRAPHICS/GRINT2FH.ASM')
| -rw-r--r-- | v4.0/src/CMD/GRAPHICS/GRINT2FH.ASM | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/v4.0/src/CMD/GRAPHICS/GRINT2FH.ASM b/v4.0/src/CMD/GRAPHICS/GRINT2FH.ASM new file mode 100644 index 0000000..b195c25 --- /dev/null +++ b/v4.0/src/CMD/GRAPHICS/GRINT2FH.ASM | |||
| @@ -0,0 +1,146 @@ | |||
| 1 | PAGE ,132 ;AN000; | ||
| 2 | TITLE DOS - GRAPHICS Command - Interrupt 2FH Driver ;AN000; | ||
| 3 | ;AN000; | ||
| 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000; | ||
| 5 | ;; DOS - GRAPHICS Command | ||
| 6 | ;; (C) Copyright 1988 Microsoft | ||
| 7 | ;; ;AN000; | ||
| 8 | ;; File Name: GRINT2FH.ASM ;AN000; | ||
| 9 | ;; ---------- ;AN000; | ||
| 10 | ;; ;AN000; | ||
| 11 | ;; Description: ;AN000; | ||
| 12 | ;; ------------ ;AN000; | ||
| 13 | ;; This file contains the Interrupt 2FH driver. ;AN000; | ||
| 14 | ;; ;AN000; | ||
| 15 | ;; Documentation Reference: ;AN000; | ||
| 16 | ;; ------------------------ ;AN000; | ||
| 17 | ;; OASIS High Level Design ;AN000; | ||
| 18 | ;; OASIS GRAPHICS I1 Overview ;AN000; | ||
| 19 | ;; ;AN000; | ||
| 20 | ;; Procedures Contained in This File: ;AN000; | ||
| 21 | ;; ---------------------------------- ;AN000; | ||
| 22 | ;; INT_2FH_DRIVER - Interrupt 2FH driver ;AN000; | ||
| 23 | ;; ;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; | ||
| 30 | ;; ;AN000; | ||
| 31 | ;; External Procedure References: ;AN000; | ||
| 32 | ;; ------------------------------ ;AN000; | ||
| 33 | ;; Calls next Int 2FH handler in the chain. ;AN000; | ||
| 34 | ;; ;AN000; | ||
| 35 | ;; Linkage Instructions: ;AN000; | ||
| 36 | ;; -------------------- ;AN000; | ||
| 37 | ;; Refer to GRAPHICS.ASM ;AN000; | ||
| 38 | ;; ;AN000; | ||
| 39 | ;; Change History: ;AN000; | ||
| 40 | ;; --------------- ;AN000; | ||
| 41 | ;; ;AN000; | ||
| 42 | ;; ;AN000; | ||
| 43 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000; | ||
| 44 | ;; ;AN000; | ||
| 45 | ;; ;AN000; | ||
| 46 | CODE SEGMENT PUBLIC 'CODE' ;; ;AN000; | ||
| 47 | ASSUME CS:CODE,DS:CODE ;; ;AN000; | ||
| 48 | ;; ;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; | ||
| 54 | ;; ;AN000; | ||
| 55 | ;; ;AN000; | ||
| 56 | .XLIST ;AN000; | ||
| 57 | INCLUDE STRUC.INC ;AN000; | ||
| 58 | INCLUDE GRINST.EXT ;AN000; | ||
| 59 | INCLUDE GRCTRL.EXT ;AN000; | ||
| 60 | INCLUDE GRCPSD.EXT ;AN000; | ||
| 61 | .LIST ;AN000; | ||
| 62 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000; | ||
| 63 | ;; ;AN000; | ||
| 64 | ;; Module: INT_2FH_DRIVER ;AN000; | ||
| 65 | ;; ;AN000; | ||
| 66 | ;; Description: ;AN000; | ||
| 67 | ;; Respond to GRAPHICS Int 2FH calls. ;AN000; | ||
| 68 | ;; The following calls are handled: ;AN000; | ||
| 69 | ;; ;AN000; | ||
| 70 | ;; AL = 0 ù Install Check ;AN000; | ||
| 71 | ;; ;AN000; | ||
| 72 | ;; Invoked By: ;AN000; | ||
| 73 | ;; INT 2FH instruction. ;AN000; | ||
| 74 | ;; ;AN000; | ||
| 75 | ;; Modules Called: ;AN000; | ||
| 76 | ;; Lower level INT 2FH handlers. ;AN000; | ||
| 77 | ;; ;AN000; | ||
| 78 | ;; Input Registers: ;AN000; | ||
| 79 | ;; Install Check - AH=15H AL=0 ;AN000; | ||
| 80 | ;; ;AN000; | ||
| 81 | ;; ;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; | ||
| 86 | ;; ELSE ;AN000; | ||
| 87 | ;; AH=15H AL=0 ;AN000; | ||
| 88 | ;; ;AN000; | ||
| 89 | ;; Logic: ;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; | ||
| 94 | ;; ENDIF ;AN000; | ||
| 95 | ;; IRET ;AN000; | ||
| 96 | ;; ELSE ;AN000; | ||
| 97 | ;; IF OLD_INT_2FH is a valid pointer THEN ;AN000; | ||
| 98 | ;; Jump to Old Int 2FH ;AN000; | ||
| 99 | ;; ELSE ;AN000; | ||
| 100 | ;; IRET ;AN000; | ||
| 101 | ;; ENDIF ;AN000; | ||
| 102 | ;; ENDIF ;AN000; | ||
| 103 | ;; ;AN000; | ||
| 104 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000; | ||
| 105 | ;AN000; | ||
| 106 | INT_2FH_DRIVER PROC NEAR ;AN000; | ||
| 107 | JMP INT_2FH ;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; | ||
| 114 | ;AN000; | ||
| 115 | INT_2FH: ;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; | ||
| 127 | POP ES ; ;AN000; | ||
| 128 | MOV AH,0FFH ; AL and AH := "We are installed" ;AN000; | ||
| 129 | MOV AL,AH ; ;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; | ||
| 144 | ;AN000; | ||
| 145 | CODE ENDS ;AN000; | ||
| 146 | END ;AN000; | ||