1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6 ;------------------------------------------------------------------------------
7 ;AN001; D425 For OS2 compatibiltiy box, /L option status query 01/14/88 J.K.
8 ;AN002; D493 New INIT request structure for error message 02/25/88 J.K.
9 ;AN003; P4934 Change ANSI 2F function number t0 1Ah 05/20/88 F.G.
10 ;------------------------------------------------------------------------------
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13 ; DEVICE Header DS:[SI] -- to locate the next CON header
14 ; NEXT device header ES:[DI]
16 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17 HP EQU DS:[SI] ; ;AN000;
18 NHD EQU ES:[DI] ; ;AN000;
20 NAME_LEN EQU 8 ; ;AN000;
23 DH_NEXTO DW ? ; offset of pointer to next header ;AN000;
24 DH_NEXTS DW ? ; segment of pointer to next header ;AN000;
25 DW ? ; attribute ;AN000;
26 DH_STRAO DW ? ; offset to strategy routine ;AN000;
27 DH_INTRO DW ? ; offset to interrupt routine ;AN000;
28 DH_NAME DB NAME_LEN DUP(0) ; device name in this header ;AN000;
29 DHS ENDS ; end of common portion ;AN000;
30 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
32 ; CON data structure CS:[BX]
34 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
35 CONPTR EQU CS:[BX] ; ;AN000;
37 BUF_DATA STRUC ; ;AN000;
38 DEV_HDRO DW -1 ; device driver header offset ;AN000;
39 DEV_HDRS DW -1 ; ;AN000;
40 CON_STRAO DW -1 ; dos CON strategy offset ;AN000;
41 CON_STRAS DW -1 ; ;AN000;
42 CON_INTRO DW -1 ; dos CON strategy offset ;AN000;
43 CON_INTRS DW -1 ; ;AN000;
44 BUF_DATA ENDS ; ;AN000;
45 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000;
47 ; INIT Structures and equates
49 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
50 ROM_BIOS EQU 40h ; Segment of ROM_BIOS data area ;AN000;
51 EQUIP_FLAG EQU 10h ; equipment flag. (for LCD) ;AN000;
52 KBD_FLAG_3 EQU 96h ; offset of KBD_FLAG_3 in data area ;AN000;
53 NUM_ROWS EQU 84h ; offset of number of rows in data area;AN000;
54 EXT16_FLAG EQU 00010000b ; mask for Extended INT16 bit ;AN000;
55 INIT_VID_MASK EQU 0FFCFh ; mask for equipment list ;AN000;
56 LCD_COLOR_MODE EQU 20h ; LCD as color ;AN000;
57 LCD_MONO_MODE EQU 30h ; LCD as MONOchrome ;AN000;
58 UNKNOWN_CMD EQU 8103H ; unknown command status byte ;AN000;
59 RC_EOL EQU -1 ; parser return code for EOL ;AN000;
60 RC_NO_ERROR EQU 0 ; parser return code for not in switch list ;AN000;
61 INVALID_PARM EQU 10 ; PARSE Invalid parameter message number ;AN000;
62 SSTRING EQU 3 ; PARSE Too many parameters message ;AN000;
63 FUNC_CALL EQU 1BH ; VGA functionality call ;AN000;
64 ALT_SELECT EQU 12H ; EGA alternate select call ;AN000;
65 EGA_INFO EQU 10H ; EGA return information subcall ;AN000;
66 ALT_PRT_SC EQU 20H ; select alternate print screen subcall;AN000;
67 MONOCHROME EQU 1 ; monochrome attached to EGA ;AN000;
68 COLOR EQU 0 ; some color attached to EGA ;AN000;
69 PS2_MONO EQU 7 ; display adapter types... ;AN000;
70 PS2_COLOR EQU 8 ; ;AN000;
71 MOD30_MONO EQU 0BH ; ;AN000;
72 MOD30_COLOR EQU 0CH ; ;AN000;
73 LCD_MODEL EQU 0F9H ; Convertible model byte value ;AN000;
74 GET_SYS_ID EQU 0C0H ; INT15H call for system identification;AN000;
75 GET_STATUS EQU 43H ; read system status (Convertible) ;AN000;
76 MONO_ADDRESS EQU 0B000H ; base address for monochrome ;AN000;
77 COLOR_ADDRESS EQU 0B800H ; base address for CGA ;AN000;
78 UNOCCUPIED EQU -1 ; value in VIDEO_MODE_TABLE if space unused ;AN000;
79 LCD_ACTIVE EQU 00000001B ; LCD adapter is present ;AN000;
80 MONO_ACTIVE EQU 00000010B ; monochrome adapter is present ;AN000;
81 CGA_ACTIVE EQU 00000100B ; CGA adapter is present ;AN000;
82 MCGA_ACTIVE EQU 00001000B ; MCGA is present ;AN000;
83 E5151_ACTIVE EQU 00010000B ; EGA with monochrome is present ;AN000;
84 E5153_ACTIVE EQU 00100000B ; EGA with color display is present ;AN000;
85 E5154_ACTIVE EQU 01000000B ; EGA with enhanced color display is present ;AN000;
86 VGA_ACTIVE EQU 10000000B ; VGA is present ;AN000;
87 INT10_LOW EQU (4*10H) ; interrupt 10 vector location ;AN000;
88 INT10_HI EQU (4*10H)+2 ; ;AN000;
89 INT2F_LOW EQU (4*2FH) ; interrupt 2F vector location ;AN000;
90 INT2F_HI EQU (4*2FH)+2 ; ;AN000;
95 FOURTEEN EQU 14 ; ;AN000;
96 REQ_CRSR_POS EQU 3 ; function call to return cursor position ;AN000;
98 MODE13 EQU 13 ; ;AN000;
99 MODE15 EQU 15 ; ;AN000;
100 MODE19 EQU 19 ; ;AN000;
102 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000;
104 ; Request Header Structure (INIT)
106 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
107 INIT_REQ_HDR STRUC ; INIT Request header structure ;AN000;
108 DB 13 DUP(?) ; standard request header ;AN000;
109 NUM_UNITS DB ? ; number of units (N/A) ;AN000;
110 END_ADDRESS_O DW ? ; ending address of resident code ;AN000;
111 END_ADDRESS_S DW ? ; ;AN000;
112 ARG_PTR DD ? ; ptr. to remaining arguments ;AN000;
113 DRIVE_NUM DB ? ; drive number (N/A) ;AN000;
114 CONFIG_ERRMSG dw 0 ;Flag to control "Error in CONFIG.SYS.." msg.;AN002;
115 INIT_REQ_HDR ENDS ; ;AN000;
116 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
118 ; Information Block Structure
119 ; (for functionality call)
121 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
122 INFO_BLOCK STRUC ; information block for functionality call ;AN000;
123 STATIC_ADDRESS DD ? ; address of static functionality table ;AN000;
124 DB 33 DUP(?) ; don't care ;AN000;
125 ACTIVE_DISPLAY DB ? ; active display code ;AN000;
126 ALT_DISPLAY DB ? ; alternate display code ;AN000;
127 DB 3 DUP(?) ; don't care ;AN000;
128 CURRENT_SCANS DB ? ; current number of scan lines ;AN000;
129 DB 2 DUP(?) ; don't care ;AN000;
130 MISC_INFO DB ? ; miscellaneous state information ;AN000;
131 DB 18 DUP(?) ; don't care ;AN000;
132 INFO_BLOCK ENDS ; ;AN000;
133 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
135 ; Video table entry structure
137 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
138 MODE_TABLE STRUC ; ;AN000;
139 V_MODE DB -1 ; video mode ;AN000;
140 D_MODE DB -1 ; display mode ;AN000;
141 RESERVED_BYTE DB 0 ; reserved ;AN000;
142 COLORS DW -1 ; colors ;AN000;
143 SCR_WIDTH DW -1 ; screen width (pels) ;AN000;
144 SCR_LENGTH DW -1 ; screen length (pels) ;AN000;
145 SCR_COLS DW -1 ; number columns ;AN000;
146 SCR_ROWS DW -1 ; number rows ;AN000;
147 MODE_TABLE ENDS ; ;AN000;
148 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
150 ; Structure of Static Block
151 ; (for functionality call
153 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
154 STATIC_BLOCK STRUC ; format of static functionality table ;AN000;
155 DB 7 DUP(?) ; don't care ;AN000;
156 SCAN_TEXT DB ? ; available scan lines in text modes ;AN000;
157 STATIC_BLOCK ENDS ; ;AN000;
158 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
160 ; Structure of System ID call return block
162 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
163 SYS_ID STRUC ; format of return system config data ;AN000;
164 DW ? ; don't care ;AN000;
165 MODEL_BYTE DB ? ; model byte ;AN000;
166 SYS_ID ENDS ; ;AN000;
168 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
170 ; INT2f Strucs and Equates
172 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
173 MULT_ANSI EQU 1Ah ; ANSI multiplex number ;AC003;
175 INSTALL_CHECK EQU 0 ; install check for ANSI ;AN000;
176 IOCTL_2F EQU 1 ; 2F interface to IOCTL ;AN000;
177 DA_INFO_2F EQU 2h ;J.K. Information passing to ANSI.
178 ;Subfunction code for IOCTL_2F
179 GET_SUBFUNC EQU 7FH ; WGR Same structure as GET_IOCTL(ANSI);AN000;
181 ;Info Struture for DA_INFO_2F. (DS:DX point to this packet)
182 ;J.K. Note: For DOS 4.00, DA_INFO_PACKET is used by DISPLAY.SYS to signal ANSI.SYS that
183 ;DISPLAY.SYS is calling/finishing INT 10h SET MODE call. ANSI.SYS needs this
184 ;infomration since it also hooks INT 10h vector.
185 ;For this DA_SETMODE_FLAG purpose, DA_INFO_LEVEL and DA_INFO_DIRECTION should always be
186 ;set to 0. This can be extended for another information passing scheme between
187 ;DISPLAY.SYS and ANSI.SYS in the future version.
188 ;For DA_SETMODE_FLAG, DISPLAY.SYS should be extremely careful that when it calls
189 ;with DA_SETMODE_FLAG =1, then it should calls with DA_SETMODE_FLAG=0
190 ;when it finished INT 10h function call. Otherwise, the system goes .....
192 ;D425. At the request of OS2 compatibility box, when the user ask to ANSI
193 ; with DA_INFO_LEVEL=1, then ANSI sets DA_OPTION_L_STATE based on /L option
197 DA_INFO_LEVEL db 0 ; 0=used for SET_MODE_FLAG 1=for OPTION_L_STATE
198 DA_SETMODE_FLAG db 0 ; 1: DISPLAY.SYS is calling INT 10h call, SET MODE. 0=finished.
199 DA_OPTION_L_STATE db 0 ; 1 = /L active, 0 = /L inactive
202 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
204 ; GENERIC IOCTL Strucs and Equates
206 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
208 DISPLAY_TYPE EQU 3 ; MAJ_FUNC type for display ;AN000;
209 GET_FUNC EQU 7FH ; MIN_FUNC for get subfunction ;AN000;
210 SET_FUNC EQU 5FH ; MIN_FUNC for set subfunction ;AN000;
211 REQ_VID_MODE EQU 0FH ; request video mode INT10h function call ;AN000;
212 DONE EQU 0100H ; set done bit for IOCTL status ;AN000;
213 CMD_ERROR EQU 8000H ; set error bit for IOCTL status ;AN000;
214 INVALID_FUNC EQU 1 ; invalid function ;AN000;
215 NOT_SUPPORTED EQU 10 ; return code non-supported ioctl function ;AN000;
216 NOT_AVAILABLE EQU 12 ; return code for font not available ;AN000;
217 TEXT_MODE EQU 1 ; text mode = 1 in request packet ;AN000;
218 GRAPHICS_MODE EQU 2 ; graphics mode = 2 ;AN000;
219 DEFAULT_LENGTH EQU 25 ; normal screen length ;AN000;
220 OFF EQU 0000H ; ;AN000;
221 ON EQU 0001H ; ;AN000;
222 INT_BIT EQU 00100000b ; mask for int. bit from functionality call ;AN000;
223 FOUND EQU 1 ; flag value for FOUND ;AN000;
224 NOT_FOUND EQU 0 ; flag value for not FOUND ;AN000;
225 SET_MODE EQU 0 ; set mode INT10H function number ;AN000;
226 DISPLAY_CHECK EQU 0AD00H ; install check for DISPLAY.SYS ;AN000;
227 CHECK_ACTIVE EQU 0AD02H ; active code page check for DISPLAY.SY;AN000;
228 INSTALLED EQU 0FFH ; present in AL if installed ;AN000;
229 LOAD_8X8 EQU 1112H ; register value for 8x8 ROM load ;AN000;
230 SET_BLOCK_0 EQU 1103H ; activate block = 0. ;AN000;
231 CHECK_FOR_FONT EQU 0AD10H ; check for 8x8 RAM font - DISPLAY.SYS ;AN000;
232 SELECT_SCAN EQU 30H ; subfunction to set scan lines (VGA) ;AN000;
233 SET_INTENSIFY EQU 0 ; value to enable intensify. ;AN000;
234 SET_BLINK EQU 1 ; value to enable blink. ;AN000;
235 BLINK_TOGGLE EQU 1003H ; INT10 call to toggle int/blink bit. ;AN000;
236 CURSOR_FLAG EQU 87H ; cursor flag byte in ROM_BIOS ;AN000;
237 SET_CURSOR_CALL EQU 1 ; INT10 function call to set cursor typ;AN000;
238 VIDEO_MASK EQU 7FH ; turn of clear buffer bit of mode value ;AN000;
239 MULT_ANSI EQU 1Ah ; ANSI multiplex number ;AC003;
240 INSTALL_CHECK EQU 0 ; install check for ANSI ;AN000;
241 IOCTL_2F EQU 1 ; 2F interface to IOCTL ;AN000;
242 NOT_CY EQU 0FFFEH ; turn carry bit off ;AN000;
243 CY EQU 1 ; turn carry bit off ;AN000;
244 INVALID_FLAGS EQU 0FFFEH ; test for invalid flags in control word ;AN000;
245 TURN_OFF EQU 0FEH ; values to turn off and on cursor.. ;AN000;
246 TURN_ON EQU NOT TURN_OFF ; emulation ;AN000;
247 SUB_SIZE EQU 11 ; sublist size ;AN000;
248 LEFT_ASCIIZ EQU 00010000B ; left-aligned asciiz string ;AN000;
249 UNLIMITED EQU 0 ; unlimited message size. ;AN000;
251 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
253 ; Request Header Structure (Generic IOCTL)
255 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
256 INIT_REQ_HDR STRUC ; ;AN000;
257 DB 13 DUP(?) ; standard request header ;AN000;
258 MAJ_FUNC DB ? ; major function ;AN000;
259 MIN_FUNC DB ? ; minor function ;AN000;
260 IOCTL_SI DW ? ; contents of SI ;AN000;
261 IOCTL_DI DW ? ; contents of DI ;AN000;
262 REQ_PCKT_PTR DD ? ; pointer to request packet ;AN000;
263 INIT_REQ_HDR ENDS ; ;AN000;
264 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
266 ; REQUEST PACKET STRUCTURE (Generic IOCTL)
268 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
269 REQ_PCKT STRUC ; ;AN000;
270 INFO_LEVEL DB ? ; information level (should be 0) ;AN000;
271 DB ? ; reserved ;AN000;
272 DATA_LENGTH DW ? ; length of remaining data ;AN000;
273 RP_FLAGS DW ? ; control flags ;AN000;
274 RP_MODE DB ? ; display mode ;AN000;
275 RESERVED2 DB ? ; reserved ;AN000;
276 RP_COLORS DW ? ; # of colors ;AN000;
277 RP_WIDTH DW ? ; screen width ;AN000;
278 RP_LENGTH DW ? ; screen length ;AN000;
279 RP_COLS DW ? ; columns ;AN000;
280 RP_ROWS DW ? ; rows ;AN000;
281 REQ_PCKT ENDS ; ;AN000;
282 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
284 ; Scan Lines available structure
286 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
287 SCAN_LINE_STR STRUC ; ;AN000;
288 NUM_LINES DW ? ; number of scan lines ;AN000;
289 REP_1BH DB ? ; representation in 1Bh call ;AN000;
290 REP_12H DB ? ; representation in 12h call ;AN000;
291 SCAN_LINE_STR ENDS ; ;AN000;
292 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
296 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
297 SUB_STRUC STRUC ; ;AN000;
298 DB 2 DUP(?) ; ;AN000;
299 SUB_PTR_O DW ? ; ;AN000;
300 SUB_PTR_S DW ? ; ;AN000;
301 SUB_STRUC ENDS ; ;AN000;
302 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
304 ; RESULT BUFFER struc
306 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
307 RESULT_STRUC STRUC ; ;AN000;
308 RESULT_TYPE DB ? ; ;AN000;
310 RES_SYN_PTR DW ? ; ;AN000;
311 RES_PTR DD ? ; ;AN000;
312 RESULT_STRUC ENDS ; ;AN000;