summaryrefslogtreecommitdiff
path: root/v4.0/src/DEV/ANSI/ANSI.INC
diff options
context:
space:
mode:
authorGravatar Mark Zbikowski2024-04-25 21:24:10 +0100
committerGravatar Microsoft Open Source2024-04-25 22:32:27 +0000
commit2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch)
tree80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/DEV/ANSI/ANSI.INC
parentMerge pull request #430 from jpbaltazar/typoptbr (diff)
downloadms-dos-main.tar.gz
ms-dos-main.tar.xz
ms-dos-main.zip
MZ is back!HEADmain
Diffstat (limited to 'v4.0/src/DEV/ANSI/ANSI.INC')
-rw-r--r--v4.0/src/DEV/ANSI/ANSI.INC312
1 files changed, 312 insertions, 0 deletions
diff --git a/v4.0/src/DEV/ANSI/ANSI.INC b/v4.0/src/DEV/ANSI/ANSI.INC
new file mode 100644
index 0000000..ff0a217
--- /dev/null
+++ b/v4.0/src/DEV/ANSI/ANSI.INC
@@ -0,0 +1,312 @@
1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2;
3; Equates and Strucs.
4;
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12;
13; DEVICE Header DS:[SI] -- to locate the next CON header
14; NEXT device header ES:[DI]
15;
16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17HP EQU DS:[SI] ; ;AN000;
18NHD EQU ES:[DI] ; ;AN000;
19 ;
20NAME_LEN EQU 8 ; ;AN000;
21 ;
22DHS STRUC ; ;AN000;
23DH_NEXTO DW ? ; offset of pointer to next header ;AN000;
24DH_NEXTS DW ? ; segment of pointer to next header ;AN000;
25 DW ? ; attribute ;AN000;
26DH_STRAO DW ? ; offset to strategy routine ;AN000;
27DH_INTRO DW ? ; offset to interrupt routine ;AN000;
28DH_NAME DB NAME_LEN DUP(0) ; device name in this header ;AN000;
29DHS ENDS ; end of common portion ;AN000;
30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
31;
32; CON data structure CS:[BX]
33;
34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
35CONPTR EQU CS:[BX] ; ;AN000;
36 ; STATES ;AN000;
37BUF_DATA STRUC ; ;AN000;
38DEV_HDRO DW -1 ; device driver header offset ;AN000;
39DEV_HDRS DW -1 ; ;AN000;
40CON_STRAO DW -1 ; dos CON strategy offset ;AN000;
41CON_STRAS DW -1 ; ;AN000;
42CON_INTRO DW -1 ; dos CON strategy offset ;AN000;
43CON_INTRS DW -1 ; ;AN000;
44BUF_DATA ENDS ; ;AN000;
45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000;
46;
47; INIT Structures and equates
48;
49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
50ROM_BIOS EQU 40h ; Segment of ROM_BIOS data area ;AN000;
51EQUIP_FLAG EQU 10h ; equipment flag. (for LCD) ;AN000;
52KBD_FLAG_3 EQU 96h ; offset of KBD_FLAG_3 in data area ;AN000;
53NUM_ROWS EQU 84h ; offset of number of rows in data area;AN000;
54EXT16_FLAG EQU 00010000b ; mask for Extended INT16 bit ;AN000;
55INIT_VID_MASK EQU 0FFCFh ; mask for equipment list ;AN000;
56LCD_COLOR_MODE EQU 20h ; LCD as color ;AN000;
57LCD_MONO_MODE EQU 30h ; LCD as MONOchrome ;AN000;
58UNKNOWN_CMD EQU 8103H ; unknown command status byte ;AN000;
59RC_EOL EQU -1 ; parser return code for EOL ;AN000;
60RC_NO_ERROR EQU 0 ; parser return code for not in switch list ;AN000;
61INVALID_PARM EQU 10 ; PARSE Invalid parameter message number ;AN000;
62SSTRING EQU 3 ; PARSE Too many parameters message ;AN000;
63FUNC_CALL EQU 1BH ; VGA functionality call ;AN000;
64ALT_SELECT EQU 12H ; EGA alternate select call ;AN000;
65EGA_INFO EQU 10H ; EGA return information subcall ;AN000;
66ALT_PRT_SC EQU 20H ; select alternate print screen subcall;AN000;
67MONOCHROME EQU 1 ; monochrome attached to EGA ;AN000;
68COLOR EQU 0 ; some color attached to EGA ;AN000;
69PS2_MONO EQU 7 ; display adapter types... ;AN000;
70PS2_COLOR EQU 8 ; ;AN000;
71MOD30_MONO EQU 0BH ; ;AN000;
72MOD30_COLOR EQU 0CH ; ;AN000;
73LCD_MODEL EQU 0F9H ; Convertible model byte value ;AN000;
74GET_SYS_ID EQU 0C0H ; INT15H call for system identification;AN000;
75GET_STATUS EQU 43H ; read system status (Convertible) ;AN000;
76MONO_ADDRESS EQU 0B000H ; base address for monochrome ;AN000;
77COLOR_ADDRESS EQU 0B800H ; base address for CGA ;AN000;
78UNOCCUPIED EQU -1 ; value in VIDEO_MODE_TABLE if space unused ;AN000;
79LCD_ACTIVE EQU 00000001B ; LCD adapter is present ;AN000;
80MONO_ACTIVE EQU 00000010B ; monochrome adapter is present ;AN000;
81CGA_ACTIVE EQU 00000100B ; CGA adapter is present ;AN000;
82MCGA_ACTIVE EQU 00001000B ; MCGA is present ;AN000;
83E5151_ACTIVE EQU 00010000B ; EGA with monochrome is present ;AN000;
84E5153_ACTIVE EQU 00100000B ; EGA with color display is present ;AN000;
85E5154_ACTIVE EQU 01000000B ; EGA with enhanced color display is present ;AN000;
86VGA_ACTIVE EQU 10000000B ; VGA is present ;AN000;
87INT10_LOW EQU (4*10H) ; interrupt 10 vector location ;AN000;
88INT10_HI EQU (4*10H)+2 ; ;AN000;
89INT2F_LOW EQU (4*2FH) ; interrupt 2F vector location ;AN000;
90INT2F_HI EQU (4*2FH)+2 ; ;AN000;
91ONE EQU 1 ; ;AN000;
92THREE EQU 3 ; ;AN000;
93EIGHT EQU 8 ; ;AN000;
94NINE EQU 9 ; ;AN000;
95FOURTEEN EQU 14 ; ;AN000;
96REQ_CRSR_POS EQU 3 ; function call to return cursor position ;AN000;
97MODE7 EQU 7 ; ;AN000;
98MODE13 EQU 13 ; ;AN000;
99MODE15 EQU 15 ; ;AN000;
100MODE19 EQU 19 ; ;AN000;
101 ; ;AN000;
102;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AN000;
103;
104; Request Header Structure (INIT)
105;
106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
107INIT_REQ_HDR STRUC ; INIT Request header structure ;AN000;
108 DB 13 DUP(?) ; standard request header ;AN000;
109NUM_UNITS DB ? ; number of units (N/A) ;AN000;
110END_ADDRESS_O DW ? ; ending address of resident code ;AN000;
111END_ADDRESS_S DW ? ; ;AN000;
112ARG_PTR DD ? ; ptr. to remaining arguments ;AN000;
113DRIVE_NUM DB ? ; drive number (N/A) ;AN000;
114CONFIG_ERRMSG dw 0 ;Flag to control "Error in CONFIG.SYS.." msg.;AN002;
115INIT_REQ_HDR ENDS ; ;AN000;
116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
117;
118; Information Block Structure
119; (for functionality call)
120;
121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
122INFO_BLOCK STRUC ; information block for functionality call ;AN000;
123STATIC_ADDRESS DD ? ; address of static functionality table ;AN000;
124 DB 33 DUP(?) ; don't care ;AN000;
125ACTIVE_DISPLAY DB ? ; active display code ;AN000;
126ALT_DISPLAY DB ? ; alternate display code ;AN000;
127 DB 3 DUP(?) ; don't care ;AN000;
128CURRENT_SCANS DB ? ; current number of scan lines ;AN000;
129 DB 2 DUP(?) ; don't care ;AN000;
130MISC_INFO DB ? ; miscellaneous state information ;AN000;
131 DB 18 DUP(?) ; don't care ;AN000;
132INFO_BLOCK ENDS ; ;AN000;
133;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
134;
135; Video table entry structure
136;
137;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
138MODE_TABLE STRUC ; ;AN000;
139V_MODE DB -1 ; video mode ;AN000;
140D_MODE DB -1 ; display mode ;AN000;
141RESERVED_BYTE DB 0 ; reserved ;AN000;
142COLORS DW -1 ; colors ;AN000;
143SCR_WIDTH DW -1 ; screen width (pels) ;AN000;
144SCR_LENGTH DW -1 ; screen length (pels) ;AN000;
145SCR_COLS DW -1 ; number columns ;AN000;
146SCR_ROWS DW -1 ; number rows ;AN000;
147MODE_TABLE ENDS ; ;AN000;
148;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
149;
150; Structure of Static Block
151; (for functionality call
152;
153;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
154STATIC_BLOCK STRUC ; format of static functionality table ;AN000;
155 DB 7 DUP(?) ; don't care ;AN000;
156SCAN_TEXT DB ? ; available scan lines in text modes ;AN000;
157STATIC_BLOCK ENDS ; ;AN000;
158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
159;
160; Structure of System ID call return block
161;
162;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
163SYS_ID STRUC ; format of return system config data ;AN000;
164 DW ? ; don't care ;AN000;
165MODEL_BYTE DB ? ; model byte ;AN000;
166SYS_ID ENDS ; ;AN000;
167
168;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
169;
170; INT2f Strucs and Equates
171;
172;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
173MULT_ANSI EQU 1Ah ; ANSI multiplex number ;AC003;
174;Catagory code
175INSTALL_CHECK EQU 0 ; install check for ANSI ;AN000;
176IOCTL_2F EQU 1 ; 2F interface to IOCTL ;AN000;
177DA_INFO_2F EQU 2h ;J.K. Information passing to ANSI.
178;Subfunction code for IOCTL_2F
179GET_SUBFUNC EQU 7FH ; WGR Same structure as GET_IOCTL(ANSI);AN000;
180
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 .....
191;
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
194; status.
195
196DA_INFO_PACKET struc
197DA_INFO_LEVEL db 0 ; 0=used for SET_MODE_FLAG 1=for OPTION_L_STATE
198DA_SETMODE_FLAG db 0 ; 1: DISPLAY.SYS is calling INT 10h call, SET MODE. 0=finished.
199DA_OPTION_L_STATE db 0 ; 1 = /L active, 0 = /L inactive
200DA_INFO_PACKET ends
201
202;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
203;
204; GENERIC IOCTL Strucs and Equates
205;
206;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
207 ; ;AN000;
208DISPLAY_TYPE EQU 3 ; MAJ_FUNC type for display ;AN000;
209GET_FUNC EQU 7FH ; MIN_FUNC for get subfunction ;AN000;
210SET_FUNC EQU 5FH ; MIN_FUNC for set subfunction ;AN000;
211REQ_VID_MODE EQU 0FH ; request video mode INT10h function call ;AN000;
212DONE EQU 0100H ; set done bit for IOCTL status ;AN000;
213CMD_ERROR EQU 8000H ; set error bit for IOCTL status ;AN000;
214INVALID_FUNC EQU 1 ; invalid function ;AN000;
215NOT_SUPPORTED EQU 10 ; return code non-supported ioctl function ;AN000;
216NOT_AVAILABLE EQU 12 ; return code for font not available ;AN000;
217TEXT_MODE EQU 1 ; text mode = 1 in request packet ;AN000;
218GRAPHICS_MODE EQU 2 ; graphics mode = 2 ;AN000;
219DEFAULT_LENGTH EQU 25 ; normal screen length ;AN000;
220OFF EQU 0000H ; ;AN000;
221ON EQU 0001H ; ;AN000;
222INT_BIT EQU 00100000b ; mask for int. bit from functionality call ;AN000;
223FOUND EQU 1 ; flag value for FOUND ;AN000;
224NOT_FOUND EQU 0 ; flag value for not FOUND ;AN000;
225SET_MODE EQU 0 ; set mode INT10H function number ;AN000;
226DISPLAY_CHECK EQU 0AD00H ; install check for DISPLAY.SYS ;AN000;
227CHECK_ACTIVE EQU 0AD02H ; active code page check for DISPLAY.SY;AN000;
228INSTALLED EQU 0FFH ; present in AL if installed ;AN000;
229LOAD_8X8 EQU 1112H ; register value for 8x8 ROM load ;AN000;
230SET_BLOCK_0 EQU 1103H ; activate block = 0. ;AN000;
231CHECK_FOR_FONT EQU 0AD10H ; check for 8x8 RAM font - DISPLAY.SYS ;AN000;
232SELECT_SCAN EQU 30H ; subfunction to set scan lines (VGA) ;AN000;
233SET_INTENSIFY EQU 0 ; value to enable intensify. ;AN000;
234SET_BLINK EQU 1 ; value to enable blink. ;AN000;
235BLINK_TOGGLE EQU 1003H ; INT10 call to toggle int/blink bit. ;AN000;
236CURSOR_FLAG EQU 87H ; cursor flag byte in ROM_BIOS ;AN000;
237SET_CURSOR_CALL EQU 1 ; INT10 function call to set cursor typ;AN000;
238VIDEO_MASK EQU 7FH ; turn of clear buffer bit of mode value ;AN000;
239MULT_ANSI EQU 1Ah ; ANSI multiplex number ;AC003;
240INSTALL_CHECK EQU 0 ; install check for ANSI ;AN000;
241IOCTL_2F EQU 1 ; 2F interface to IOCTL ;AN000;
242NOT_CY EQU 0FFFEH ; turn carry bit off ;AN000;
243CY EQU 1 ; turn carry bit off ;AN000;
244INVALID_FLAGS EQU 0FFFEH ; test for invalid flags in control word ;AN000;
245TURN_OFF EQU 0FEH ; values to turn off and on cursor.. ;AN000;
246TURN_ON EQU NOT TURN_OFF ; emulation ;AN000;
247SUB_SIZE EQU 11 ; sublist size ;AN000;
248LEFT_ASCIIZ EQU 00010000B ; left-aligned asciiz string ;AN000;
249UNLIMITED EQU 0 ; unlimited message size. ;AN000;
250 ; ;AN000;
251;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
252;
253; Request Header Structure (Generic IOCTL)
254;
255;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
256INIT_REQ_HDR STRUC ; ;AN000;
257 DB 13 DUP(?) ; standard request header ;AN000;
258MAJ_FUNC DB ? ; major function ;AN000;
259MIN_FUNC DB ? ; minor function ;AN000;
260IOCTL_SI DW ? ; contents of SI ;AN000;
261IOCTL_DI DW ? ; contents of DI ;AN000;
262REQ_PCKT_PTR DD ? ; pointer to request packet ;AN000;
263INIT_REQ_HDR ENDS ; ;AN000;
264;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
265;
266; REQUEST PACKET STRUCTURE (Generic IOCTL)
267;
268;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
269REQ_PCKT STRUC ; ;AN000;
270INFO_LEVEL DB ? ; information level (should be 0) ;AN000;
271 DB ? ; reserved ;AN000;
272DATA_LENGTH DW ? ; length of remaining data ;AN000;
273RP_FLAGS DW ? ; control flags ;AN000;
274RP_MODE DB ? ; display mode ;AN000;
275RESERVED2 DB ? ; reserved ;AN000;
276RP_COLORS DW ? ; # of colors ;AN000;
277RP_WIDTH DW ? ; screen width ;AN000;
278RP_LENGTH DW ? ; screen length ;AN000;
279RP_COLS DW ? ; columns ;AN000;
280RP_ROWS DW ? ; rows ;AN000;
281REQ_PCKT ENDS ; ;AN000;
282;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
283;
284; Scan Lines available structure
285;
286;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
287SCAN_LINE_STR STRUC ; ;AN000;
288NUM_LINES DW ? ; number of scan lines ;AN000;
289REP_1BH DB ? ; representation in 1Bh call ;AN000;
290REP_12H DB ? ; representation in 12h call ;AN000;
291SCAN_LINE_STR ENDS ; ;AN000;
292;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
293;
294; SUBLIST struc
295;
296;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
297SUB_STRUC STRUC ; ;AN000;
298 DB 2 DUP(?) ; ;AN000;
299SUB_PTR_O DW ? ; ;AN000;
300SUB_PTR_S DW ? ; ;AN000;
301SUB_STRUC ENDS ; ;AN000;
302;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
303;
304; RESULT BUFFER struc
305;
306;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
307RESULT_STRUC STRUC ; ;AN000;
308RESULT_TYPE DB ? ; ;AN000;
309 DB ? ; ;AN000;
310RES_SYN_PTR DW ? ; ;AN000;
311RES_PTR DD ? ; ;AN000;
312RESULT_STRUC ENDS ; ;AN000;