5 TITLE SELECT
- DOS
- SELECT
.EXE
;AN000;
6 SUBTTL SELECT4
.asm
;AN000;
8 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10 ; SELECT4.ASM : Copyright 1988 Microsoft
14 ; COMMENTS: Assemble with MASM 3.0 (using the /A option)
16 ; Panel flow is defined in the following files:
27 ; Module contains code for :
28 ; - DOS parameters screen
29 ; - SHELL parameters screen
30 ; - FASTOPEN parameters screen
32 ; - GRAPHICS parameter screen
33 ; - EXPANDED MEMORY parameters screen
38 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
39 DATA SEGMENT BYTE PUBLIC 'DATA' ;AN000;
41 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
44 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
46 INCLUDE PANEL
.MAC
;AN000;
47 INCLUDE SELECT
.INC ;AN000;
48 INCLUDE PAN
-LIST
.INC ;AN000;
49 INCLUDE CASTRUC
.INC ;AN000;
50 INCLUDE STRUC.INC ;AN000;
51 INCLUDE MACROS
.INC ;AN000;
52 INCLUDE EXT
.INC ;AN000;
53 INCLUDE VARSTRUC
.INC ;AN000;
54 INCLUDE ROUT_EXT
.INC ;AN000;
56 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
59 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
61 SELECT
SEGMENT PARA
PUBLIC 'SELECT' ;AN000;segment for far routine
62 ASSUME
CS:SELECT
,DS:DATA ;AN000;
64 INCLUDE CASEXTRN
.INC ;AN000;
66 HLP_OVER EQU
00010000B ;AN000;
67 ICB_OUT EQU
0000000100000000B ;AN000;display default and accept input
69 PUBLIC DOS_PARAMETERS_SCREEN
;AN000;
70 EXTRN EXIT_SELECT
:NEAR ;AN000;
71 EXTRN PROCESS_ESC_F3
:NEAR ;AN000;
72 EXTRN FIRST_DISK_SCREEN
:NEAR ;AN000;
73 EXTRN VDISK_SCREEN
:NEAR ;AN000;
74 EXTRN EXIT_DOS
:NEAR ;AN000;
75 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
77 ; ������������������������������������Ŀ
78 ; �DOS_PARAMETERS_SCREENS �
80 ; ��������������������������������������
82 ; The DOS PARAMETERS SCREEN is presented if the user selected to
83 ; view/change the selections generated by SELECT ( F_REVIEW = 2 ).
84 ; The screen gets various DOS parameters (PATH, APPEND, PROMPT).
85 ; The TAB key is used to move to the next item on the parameter list.
86 ; If the cursor is on the last item in the parameter list, TAB key
87 ; will cause the cursor to wrap around to the first item of the parameter list.
88 ; When the TAB key is depressed, the current parameter value is saved in
89 ; a temporary location. The temporary parameter values are copied to actual
90 ; values only when the ENTER key is depressed.
91 ; Valid keys are ENTER, ESC, F1, F3, TAB and ASCII characters.
92 ; Since the DOS parameters APPEND and PATH are only useful for hard
93 ; disk based systems, an additional check of install to drive C: has been
94 ; included. This check is not specified in the Functional Specification.
95 ; PROMPT parameter values are not checked for validity.
96 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
97 DOS_PARAMETERS_SCREEN: ;AN000; if user accepts choices
98 .IF < F_REVIEW
eq E_REVIEW_ACCEPT
> ;AN000;
100 GOTO FIRST_DISK_SCREEN
;AN000; goto FIRST_DISK_SCREEN
103 .IF < I_DEST_DRIVE ne E_DEST_DRIVE_C
> ;AC000; if install to drive B: or A: JW
105 GOTO SHELL_SCREEN
;AN000; goto next screen
108 COPY_STRING S_STR120_1
, M_STR120_1
, S_PATH
;AN000; copy PATH to temp location
109 COPY_STRING S_STR40
, M_STR40
, S_APPEND_P
;AN000; copy APPEND parameters to temp location JW
110 COPY_STRING S_STR120_2
, M_STR120_2
,S_APPEND
;AN000; copy APPEND to temp location
111 COPY_STRING S_STR120_3
, M_STR120_3
,S_PROMPT
;AN000; copy PROMPT to temp location
113 INIT_PQUEUE PAN_DOS_PARAM
;AN000; initialize queue
114 PREPARE_PANEL PAN_HBAR
;AN000; prepare horizontal bar
115 PREPARE_CHILDREN
;AN000; prepare child panels
116 INIT_STRING STR_DOS_PATH
,S_STR120_1
, M_PATH
;AN000; display current PATH value
117 INIT_STRING STR_DOS_APPEND_P
,S_STR40
,M_APPEND_P
;AN000; display current APPEND parameters value JW
118 INIT_STRING STR_DOS_APPEND
,S_STR120_2
,M_APPEND
;AN000; display current APPEND value
119 INIT_STRING STR_DOS_PROMPT
,S_STR120_3
,M_PROMPT
;AN000; display current PROMPT value
120 DISPLAY_PANEL
;AN000; display PC/DOS parameters panel
122 INIT_VAR N_COUNTER
, 1 ;AN000; set counter = 1
124 GET_PARAMETERS: ;AN000;
126 .REPEAT ;AN000; repeat code block
130 .WHEN
< N_COUNTER
eq 1 > ;AN000;
131 GET_STRING STR_DOS_PATH
,S_STR120_1
,M_PATH
,FK_TAB
;AN000; get user parameters for PATH
132 COPY_STRING S_STR120_1
,M_STR120_1
,S_USER_STRING
;AN000; save parameter in temp location
134 .WHEN
< N_COUNTER
eq 2 > ;AN000; JW
135 GET_STRING STR_DOS_APPEND_P
,S_STR40
,M_APPEND_P
,FK_TAB
;AN000; get user parameters for APPEND JW
136 COPY_STRING S_STR40
,M_STR40
,S_USER_STRING
;AN000; save parameter in temp location JW
138 .WHEN
< N_COUNTER
eq 3 > ;AN000;
139 GET_STRING STR_DOS_APPEND
,S_STR120_2
,M_APPEND
,FK_TAB
;AN000; get user path for APPEND
140 COPY_STRING S_STR120_2
,M_STR120_2
,S_USER_STRING
;AN000; save parameter in temp location
143 GET_STRING STR_DOS_PROMPT
,S_STR120_3
,M_PROMPT
,FK_TAB
;AN000; get user parameters for PROMPT
144 COPY_STRING S_STR120_3
,M_STR120_3
,S_USER_STRING
;AN000; save parameter in temp location
148 INC_VAR N_COUNTER
;AN000; inc counter
150 .IF < N_COUNTER a
4 > ;AN000; if counter > 3
152 INIT_VAR N_COUNTER
, 1 ;AN000; set counter = 1
155 .UNTIL
< N_USER_FUNC
eq E_ENTER
> or near ;AN000; break loop if ENTER entered
156 .UNTIL
< N_USER_FUNC
eq E_ESCAPE
> or near ;AN000; or ESCAPE entered
157 .UNTIL
< N_USER_FUNC
eq E_F3
> near ;AN000; or F3 entered
162 CHECK_DOS_PATH S_STR120_1
;AN000; check PATH path
165 HANDLE_ERROR ERR_BAD_PATH
, E_RETURN
;AN000;
166 INIT_VAR N_COUNTER
, 1 ;AN000;
167 GOTO GET_PARAMETERS
;AN000;
170 CHECK_DOS_PATH S_STR120_2
;AN000; check APPEND path
173 HANDLE_ERROR ERR_BAD_PATH
, E_RETURN
;AN000;
174 INIT_VAR N_COUNTER
,2 ;AN000;
175 GOTO GET_PARAMETERS
;AN000;
178 COPY_STRING S_PATH
, M_PATH
, S_STR120_1
;AN000; save PATH parameter
179 COPY_STRING S_APPEND_P
, M_APPEND_P
, S_STR40
;AN000; save APPEND parameter JW
180 COPY_STRING S_APPEND
, M_APPEND
, S_STR120_2
;AN000; save APPEND path
181 COPY_STRING S_PROMPT
, M_PROMPT
, S_STR120_3
;AN000; save PROMPT parameter
182 PUSH_HEADING DOS_PARAMETERS_SCREEN
;AN000; save screen address on SELECT STACK
183 GOTO SHELL_SCREEN
;AN000; goto the next screen (SHELL)
184 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
186 ; ������������������������������������Ŀ
189 ; ��������������������������������������
191 ; The SHELL PARAMETERS SCREEN is presented if the user selected to
192 ; install SHELL support and the user wants to view/change parameters.
193 ; Note.The view/change parameters condition is not specified in the May 5, 1987
194 ; Functional Specification.
195 ; The screen gets the parameters for SHELL.
196 ; Valid keys are ENTER, ESC, F1, F3 and ASCII characters.
197 ; Note.User entered parameter values are not checked for validity.
198 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
199 SHELL_SCREEN: ;AN000;
200 .IF < F_SHELL
eq E_SHELL_NO
> ;AN000; if SHELL support is not required
202 GOTO FASTOPEN_SCREEN
;AN000; goto the next screen (KSAM)
205 INIT_PQUEUE PAN_SHELL
;AN000; initialize queue
206 PREPARE_PANEL PAN_HBAR
;AN000; prepare horizontal bar
207 PREPARE_CHILDREN
;AN000; prepare child panels
208 INIT_STRING STR_SHELL
,S_SHELL
,M_SHELL
;AN000; get SHELL parameters
209 DISPLAY_PANEL
;AN000; display SHELL panel
211 GET_STRING STR_SHELL
,S_SHELL
,M_SHELL
,FK_TEXT
;AN000; get SHELL parameters
213 .IF < N_USER_FUNC
eq E_ENTER
> ;AN000; if user entered ENTER key
215 COPY_STRING S_SHELL
, M_SHELL
, S_USER_STRING
;AN000; save new SHELL parameters
216 PUSH_HEADING SHELL_SCREEN
;AN000; save screen address on SELECT STACK
217 GOTO FASTOPEN_SCREEN
;AN000; goto the next screen (KSAM)
219 GOTO PROCESS_ESC_F3
;AN000; user entered ESC or F3, take action
221 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
223 ; ������������������������������������Ŀ
226 ; ��������������������������������������
228 ; The FASTOPEN PARAMETERS SCREEN is presented if the user selected to
229 ; install FASTOPEN support and the user wants to view/change the parameters.
230 ; Note.The view/change parameters condition is not specified in the May 5, 1987
231 ; Functional Specification.
232 ; The screen gets parameters for the FASTOPEN command.
233 ; Valid keys are ENTER, ESC, F1, F3 and ASCII characters.
234 ; Note.User entered parameter values are not checked for validity.
235 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
236 FASTOPEN_SCREEN: ;AN000;
237 .IF < F_FASTOPEN
eq E_FASTOPEN_NO
> or ;AN000; if FASTOPEN support not required
238 .IF < I_DEST_DRIVE ne E_DEST_DRIVE_C
> ;AC000;JW
240 GOTO SHARE_SCREEN
;AN000; goto next screen (SHARE)
243 INIT_PQUEUE PAN_FASTOPEN
;AN000; initialize queue
244 PREPARE_PANEL PAN_HBAR
;AN000; prepare horizontal bar
245 PREPARE_CHILDREN
;AN000; prepare child panels
246 INIT_STRING STR_FASTOPEN
,S_FASTOPEN
,M_FASTOPEN
;AN000; get new parameters for FASTOPEN
247 DISPLAY_PANEL
;AN000; display FASTOPEN panel
249 GET_STRING STR_FASTOPEN
,S_FASTOPEN
,M_FASTOPEN
,FK_TEXT
;AN000; get new parameters for FASTOPEN
251 .IF < N_USER_FUNC
eq E_ENTER
> ;AN000; if user entered ENTER key
253 COPY_STRING S_FASTOPEN
,M_FASTOPEN
,S_USER_STRING
;AN000;save new parameters for FASTOPEN
254 PUSH_HEADING FASTOPEN_SCREEN
;AN000; save screen address on SELECT STACK
255 GOTO SHARE_SCREEN
;AN000; goto the next screen (SHARE)
257 GOTO PROCESS_ESC_F3
;AN000; user entered ESC or F3, take action
259 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
261 ; ������������������������������������Ŀ
264 ; ��������������������������������������
266 ; The SHARE PARAMETERS SCREEN is presented if the user selected to
267 ; install SHARE support and the user wants to view/change parameters.
268 ; Note.The view/change parameters condition is not specified in the May 5, 1987
269 ; Functional Specification.
270 ; The screen gets parameters for the SHARE command.
271 ; Valid keys are ENTER, ESC, F1, F3 and ASCII characters.
272 ; Note.User entered parameter values are not checked for validity.
273 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
274 SHARE_SCREEN: ;AN000;
275 .IF < F_SHARE
eq E_SHARE_NO
> or ;AN000; if SHARE support not required
276 .IF < I_DEST_DRIVE ne E_DEST_DRIVE_C
> ;AC000;JW
278 ;; INIT_VAR F_SHARE, E_SHARE_NO ;AN021;
279 GOTO GRAPHICS_SCREEN
;AN000; goto the next screen (GRAPHICS)
282 INIT_PQUEUE PAN_SHARE
;AN000; initialize queue
283 PREPARE_PANEL PAN_HBAR
;AN000; prepare horizontal bar
284 PREPARE_CHILDREN
;AN000; prepare child panels
285 INIT_STRING STR_SHARE
,S_SHARE
,M_SHARE
;AN000; get new parameters for SHARE
286 DISPLAY_PANEL
;AN000; display SHARE panel
288 GET_STRING STR_SHARE
,S_SHARE
,M_SHARE
,FK_TEXT
;AN000; get new parameters for SHARE
290 .IF < N_USER_FUNC
eq E_ENTER
> ;AN000; if user entered ENTER key
292 COPY_STRING S_SHARE
, M_SHARE
, S_USER_STRING
;AN000; save new parameters for SHARE
293 PUSH_HEADING SHARE_SCREEN
;AN000; save screen address on SELECT STACK
294 GOTO GRAPHICS_SCREEN
;AN000; goto the next screen (GRAPHICS)
296 GOTO PROCESS_ESC_F3
;AN000; user entered ESC or F3, take action
298 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
300 ; ������������������������������������Ŀ
303 ; ��������������������������������������
305 ; The GRAPHICS PARAMETERS SCREEN is presented if the user selected to
306 ; install GRAPHICS support and the user wants to view/change parameters.
307 ; Note.The view/change parameters condition is not specified in the May 5, 1987
308 ; Functional Specification.
309 ; The screen gets parameters for the GRAPHICS command.
310 ; Valid keys are ENTER, ESC, F1, F3 and ASCII characters.
311 ; Note.User entered parameter values are not checked for validity.
312 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
313 GRAPHICS_SCREEN: ;AN000;
314 .IF < F_GRAPHICS
eq E_GRAPHICS_NO
> ;AN000; if GRAPHICS support not required
316 GOTO EXP_MEMORY_SCREEN
;AN000; goto the next screen (EXPANDED_MEM)
319 GET_PRINTER_PARAMS
0, 1, N_RETCODE
;AN000;
320 .IF < N_RETCODE
eq 1 > ;AN000;
322 COPY_STRING S_GRAPHICS
,M_GRAPHICS
,S_GRAPH_PARM
;AN000;
325 INIT_PQUEUE PAN_GRAPHICS
;AN000; initialize queue
326 PREPARE_PANEL PAN_HBAR
;AN000; prepare horizontal bar
327 PREPARE_CHILDREN
;AN000; prepare child panels
328 INIT_STRING STR_GRAPHICS
,S_GRAPHICS
,M_GRAPHICS
;AN000; get new parameters for GRAPHICS
329 DISPLAY_PANEL
;AN000; display GRAPHICS panel
331 GET_STRING STR_GRAPHICS
,S_GRAPHICS
,M_GRAPHICS
,FK_TEXT
;AN000; get new parameters for GRAPHICS
333 .IF < N_USER_FUNC
eq E_ENTER
> ;AN000; if user entered ENTER key
335 COPY_STRING S_GRAPHICS
, M_GRAPHICS
, S_USER_STRING
;AN000;save new parameters for GRAPHICS
336 PUSH_HEADING GRAPHICS_SCREEN
;AN000; save screen address on SELECT STACK
337 GOTO EXP_MEMORY_SCREEN
;AN000; goto next screen (EXPANDED_MEMORY)
339 GOTO PROCESS_ESC_F3
;AN000; user entered ESC or F3, take action
341 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
343 ; ������������������������������������Ŀ
344 ; �EXP_MEMORY_SCREEN �
346 ; ��������������������������������������
348 ; The EXPANDED MEMORY PARAMETERS SCREEN is presented if the user selected to
349 ; install expanded memory support and the user wants to view/change parameters.
350 ; Note.The view/change parameters condition is not specified in the May 5, 1987
351 ; Functional Specification.
352 ; The screen gets parameters for the XMAEM and XMA2EMS commands.
353 ; The expanded memory commands are only supported if memory above 1000000H
355 ; The TAB key is used to move to the next item on the parameter list.
356 ; If the cursor is on the last item in the parameter list, TAB key
357 ; will cause the cursor to wrap around to the first item of the parameter list.
358 ; When the TAB key is depressed, the current parameter value is saved in
359 ; a temporary location. The temporary parameter values are copied to actual
360 ; values only when the ENTER key is depressed.
361 ; Valid keys are ENTER, ESC, F1, F3 and ASCII characters.
362 ; Note.User entered parameter values are not checked for validity.
363 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
364 EXP_MEMORY_SCREEN: ;AN000;
365 .IF < F_XMA
eq E_XMA_NO
> or ;AN000; if XMA support not required
366 .IF < F_XMA
eq E_XMA_NA
> or ;AN000; or if XMA not available
367 .IF < I_DEST_DRIVE ne E_DEST_DRIVE_C
> ;AC000; or if install to drive B: or A: JW
369 GOTO VDISK_SCREEN
;AN000; goto the next screen (VDISK)
372 COPY_STRING S_STR120_1
, M_STR120_1
, S_XMAEM
;AN000; copy XMAEM to temp location
373 COPY_STRING S_STR120_2
,M_STR120_2
,S_XMA2EMS
;AN000; copy XMA2EMS to temp location
375 .IF < N_MOD80
eq E_IS_MOD80
> ;AN000; JW
377 INIT_PQUEUE PAN_EXP_MEMORY
;AN000; initialize queue
379 INIT_PQUEUE PAN_EXP_MEMORY2
;AN000; initialize queue JW
382 PREPARE_PANEL PAN_HBAR
;AN000; prepare horizontal bar
383 PREPARE_CHILDREN
;AN000; prepare child panels
385 .IF < N_MOD80
eq E_IS_MOD80
> ;AN000; JW
387 INIT_STRING STR_XMAEM
,S_STR120_1
,M_XMAEM
;AN000; display parameter for XMAEM
390 INIT_STRING STR_XMA2EMS
,S_STR120_2
,M_XMA2EMS
;AN000; display XMA2EMS parameters
391 DISPLAY_PANEL
;AN000; display EXPANDED_MEMORY panel
394 .IF < N_MOD80
eq E_IS_MOD80
> near ;AN000; JW
396 INIT_VAR N_COUNTER
,1 ;AN000; set counter = 1
398 .REPEAT ;AN000; repeat block of code
402 .WHEN
< N_COUNTER
eq 1 > near ;AN000;
403 GET_STRING STR_XMAEM
,S_STR120_1
,M_XMAEM
,FK_TAB
;AN000; get new parameter for XMAEM
404 COPY_STRING S_STR120_1
,M_STR120_1
,S_USER_STRING
;AN000; save parameter in temp location
407 GET_STRING STR_XMA2EMS
,S_STR120_2
,M_XMA2EMS
,FK_TAB
;AN000;get new parameter for XMA2EMS
408 COPY_STRING S_STR120_2
,M_STR120_2
,S_USER_STRING
;AN000; save parameter in temp location
412 INC_VAR N_COUNTER
;AN000;
414 .IF < N_COUNTER a
2 > ;AN000;
416 INIT_VAR N_COUNTER
,1 ;AN000;
419 .UNTIL
< N_USER_FUNC
eq E_ENTER
> or near ;AN000; break loop if ENTER entered
420 .UNTIL
< N_USER_FUNC
eq E_ESCAPE
> or near ;AN000; or ESCAPE entered
421 .UNTIL
< N_USER_FUNC
eq E_F3
> near ;AN000; or F3 entered
423 GET_STRING STR_XMA2EMS
,S_STR120_2
,M_XMA2EMS
,FK_TEXT
;AN000;get new parameter for XMA2EMS JW
424 COPY_STRING S_STR120_2
,M_STR120_2
,S_USER_STRING
;AN000; save parameter in temp location JW
427 .IF < N_USER_FUNC
eq E_ENTER
> ;AN000; if user entered ENTER key
429 COPY_STRING S_XMAEM
, M_XMAEM
, S_STR120_1
;AN000; save new XMAEM parameter
430 COPY_STRING S_XMA2EMS
, M_XMA2EMS
,S_STR120_2
;AN000; save new XMA2EMS parameter
431 PUSH_HEADING EXP_MEMORY_SCREEN
;AN000; save screen address on SELECT STACK
432 GOTO VDISK_SCREEN
;AN000; goto next screen (VDISK)
434 GOTO PROCESS_ESC_F3
;AN000; user entered ESC or F3, take action
436 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;