5 TITLE SELECT0
- DOS
- SELECT
.EXE
;AN000;
6 SUBTTL select0
.asm
;AN000;
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
9 ; SELECT0.ASM : Copyright 1988 Microsoft
13 ; COMMENTS: Assemble with MASM 3.0 (using the /A option)
15 ; Panel flow is defined in the following files:
26 ; This module contains the change history for the entire SELECT
27 ; component as of 1/25/88. Some changes before this date are
28 ; listed in the individual modules.
30 ; A000 - 1/25/88, designates original 4.00 level source.
31 ; A001-A009, All changes made prior to 1/25/88, these descriptions
32 ; exist in the individual modules which were Revised.
33 ; A111 - D353, 12/28/87, added support for A: to A: installation on
34 ; systems with only one diskette drive. J.W.
35 ; A010 - D407, 1/25/88, changed install to one directory to not
36 ; copy over system files. J.W.
37 ; A011 - P3231, 1/26/88, add 'PRINT /D:LPTx' or 'PRINT /D:COMx' to
38 ; autoexec.bat file for balanced and max. DOS function. S. H.
39 ; A012 - P3238, 1/27/88, add /DATE as default shell invocation switch.
41 ; A013 - P3239, 1/27/88, changed text of prompt setting in DOSSHELL.BAT
43 ; A014 - P3275, 1/29/87, added check for minimum DOS function. S. H.
44 ; A015 - P3310, 2/1/88, Removed PRINT invocation from diskette based
46 ; A016 - D445, 2/4/88, removed /REF from DOSSHELL.BAT file. S. H.
47 ; A017 - P3339, 2/4/88, Added check for read-only .BAT and .340 files,
49 ; A018 - D418, 2/4/88, removed the default /TEXT option on a model 25
51 ; A019 - D443, 2/4/88, changed 'SHELL.BAT' to DOSSHELL.BAT'. S. H.
52 ; A020 - D438, 2/5/88, removed EXT_DISKETTE_SCREEN and EXT_DISK_PARMS_SCREEN
53 ; and other code related to supporting external diskette drives.
55 ; A021 - D442, 2/8/88, Added selection of SHARE when >32M partition
57 ; A022 - P3403, 2/8/88, edited Welcome Screen to inform PS/2 users they
58 ; can use 1 or 2 MB 3.5" blank diskette. S. H.
59 ; A023 - P3292, 2/8/88, implemented error level check on FDISK to detect
60 ; a disk with no primary DOS partition defined. J.W.
61 ; A024 - D463, 2/9/88, changed method for reading and writing the
62 ; SELECT.DAT file. File can now be compressed. Eliminated
63 ; the large and slow CAS routines. J.W./D.T.
64 ; A025 - P3460, 2/10/88, Changed printer panel number and panel list
65 ; to remove unused panels. J.W.
66 ; A026 - P3450, 2/11/88, added color change to unselected fields on
67 ; the DOS location panel. J.W.
68 ; A027 - P3459, 2/15/88, set the carry flag in HANDLE_F3 in order to
69 ; eliminate an endless loop in GET_FUNCTION_CALL. S. H.
70 ; A028 - P3592, 2/22/88, Add text to direct users to Getting Started With
72 ; A029 - P3529, 2/17/88, Corrected GRAPHICS parameter initialization
74 ; A030 - P3527, 2/17/88, Changed incorrect diskette error panel to be
75 ; more descriptive. J.W.
76 ; A031 - P3546, 2/17/88, changed code to allow a semi-colon as the last
77 ; character entered in DOS or APPEND PATH. S. H.
78 ; A032 - P3576, 2/22/88, changed code to flash message on screen if
79 ; user does not put SELECT diskette in to start SELECT (360KB
80 ; diskettes only). S. H.
81 ; A033 - P3620, 2/24/88, saved the value in I_DESTINATION so that it
82 ; is not wiped out upon reboot. S. H.
83 ; A034 - P3618, 2/25/88, changed code so that user does not have to reboot
84 ; if he makes no changes to the partition. S. H.
85 ; A035 - P3654, 2/29/88, updated help texts #18 and #19 received from I.D.
87 ; A036 - P3666, 3/1/88, added GRAPHICS to the SELECT.PRT file for
88 ; Quietwriter II and Pageprinter.
89 ; A037 - P3672, 3/1/88, removed /MSG from SHELL= statement in CONFIG.SYS
90 ; for installs to hard disk (for purposes of code reduction in
92 ; A038 - P3700, 3/2/88, changed second scroll option on DOS Location
93 ; Screen to let user know system files not copied.
94 ; A039 - D496, 3/3/88, added a dummy file for the user of the SHELL
95 ; tutorial to copy and delete.
96 ; A040 - P3741, 3/4/88, changed D_XMA2EMS_1 values.
97 ; A041 - P3747, 3/4/88, changed initialization values for D_BUFFERS_2
98 ; and D_FASTOPEN_2 (max. DOS utilization)
99 ; A042 - P3737, 3/9/88, changed FDISK.EXE to FDISK.COM.
100 ; A043 - P3813, 3/10/88, moved the COMSPEC statement in the AUTOEXEC.BAT
101 ; after the @ECHO OFF statement.
102 ; A044 - P3852, 3/14/88, changed D_XMA2EMS_1 values again.
103 ; A045 - D503, 3/15/88, changed MAJOR_DOS_VER to 4 and MINOR_DOS_VER to
104 ; 00 for DOS 4.00 build. Everything visible to user still says
106 ; A046 - D474, 3/16/88, changed the /E parameter for buffers to /X.
108 ; A047 - P3924, 3/17/88, SELECT now includes VERSIONA.INC for the DOS
109 ; version check---check formerly made in MAC_EQU.INC.
110 ; A048 - P3857, 3/18/88, changed code for 360KB install to hardfile on
111 ; 256KB machine to deallocate memory before COMMAND.COM is
113 ; A049 - P4017, 3/25/88, changed capital "W" to a small "w" in the
114 ; Getting Started with DOS 4.00 title in panels.
115 ; A050 - P4020, 3/25/88, removed quote marks and spaces between 1 MB
116 ; and 2 MB on Welcome Screen.
117 ; A051 - P3992, 3/26/88, edited code for DOS Location Screen so that
118 ; ESC (hit from any field) takes you back to previous screen.
120 ; A052 - P4015, 3/28/88, stated diskette size user needs when installing
121 ; to a single 3.5 inch diskette.
122 ; A053 - D505, 3/28/88, redesigned the Dos Location screen.
123 ; A054 - P4006, 3/28/88, turned off blinking cursor on early SELECT
124 ; screens (enhanced color display used).
125 ; A055 - D508, 3/29/88, put SHARE.EXE on 720 Install diskette.
126 ; A056 - P4047, 3/29/88, revised installation complete panel for
127 ; 720 to 720 installation.
128 ; A057 - P3866, strengthened panel msg referring user to Getting Started
130 ; A058 - P3945, corrected code that creates install path when putting
131 ; DOSSHELL.BAT in the root.
132 ; A059 - P4056, 3/30/88, corrected input routines to flush buffer before
134 ; A060 - P4008, 3/30/88, added error message for help access when install
136 ; A061 - P4000, 3/30/88, corrected problem with allowable return key
138 ; A062 - P4059, 3/30/88, added FORMAT.COM to SELECT and OPERATING
139 ; diskettes; moved IFSFUNC from OPERATING to INSTALL diskette.
141 ; A063 - P3950, 4/1/88, added code to enable SELECT to install to a
142 ; 256KB 2-drive convertible.
143 ; A064 - D514, 4/6/88, revised two Installation Complete panels.
145 ; A065 - D501, 4/6/88, added code to check for OS/2 and rename its
146 ; config.sys and autoexec.bat to config.os2 and autoexec.os2.
148 ; A066 - P4179, D519, 4/6/88, moved the print statement to next to last
149 ; in the autoexec.bat file.
150 ; A067 - P4290, 4/13/88, output message to user if SELECT encounters
151 ; insufficient memory to install DOS.
152 ; A068 - P4325, 4/14/88, updated CASTRUC.INC to match G:\CASSFAR\PCSLCTP.
154 ; A069 - P4364, 4/18/88, updated SELECT to match new PCINPUT file.
155 ; A070 - P4401, 4/19/88, changed Latin America's default code page to 850.
157 ; A071 - P4428, 4/22/88, removed the /PRE parameter from the DOSSHELL.BAT.
159 ; A072 - P3950, overlay PARSER and PCINPUT segments if on a 256KB machine.
161 ; A073 - P4409, 5/2/88, corrected problem of SELECT using different default
162 ; drives on different machines---variable not assigned.
163 ; A074 - P4568, 5/2/88, disallow user to end SELECT by pressing CTRL-BREAK.
164 ; A075 - P4720, 5/6/88, changed "INSTALL COPY" diskette name to "SELECT
166 ; A076 - P4718, 5/6/88, capitalized the sentence in the INSTALLATION
167 ; COMPLETE panels which points the user to the Getting Started
168 ; with DOS 4.00 book.
169 ; A077 - P4772, 5/6/88, added /PROMPT as default startup parameter for
170 ; DOS Shell for 256K machine.
171 ; A078 - P4782, 5/9/88, changed FASTOPEN defaults for maximum DOS
172 ; function to 150,150.
173 ; A079 - P4744, 5/10/88, made panel and scroll field change for Installation
175 ; A080 - P4832, 5/11/88, changed SELECT.SKL and USA.MSG to reflect the
176 ; change of "INSTALL COPY" to "SELECT COPY" diskette (see P4720).
178 ; A081 - P4848, 5/12/88, spaced over the keys at the bottom of the help
179 ; panel to allow more room for translation; exported it on this
180 ; ptm to export help text changes.
181 ; A082 - P4916, 5/18/88, turned cursor off following FDISK reboot.
183 ; A083 - P4917, 5/19/88, stopped typomatic effect of pressing enter key
184 ; too long during installation.
185 ; A084 - P4906, 5/19/88, corrected mode 40 machine installation hang.
187 ; A085 - P4926, 5/19/88, homed the cursor before call to format so that
188 ; message stating % of diskette formatted is at top of screen.
190 ; A086 - P4934, 5/20/88, changed the 16h value used for INT 2Fh when
191 ; checking for ANSI presence to 1Ah to avoid MICROSOFT collision.
193 ; A087 - P4955, 5/23/88, adjusted the spacing between the ENTER and F1
194 ; keys on the bottom of panels 31 (Time and Date) and 32 (Format
195 ; Fixed Disk Drive) to give more room for translation.
196 ; A088 - P5064, 6/9/88, replaced a call to clear the input buffer in
197 ; PCINCHA_CALL (see A059).
198 ; A089 - P5048, 6/9/88, increased the value of MAX_NUM_PRINTER_DEFS to
199 ; allow more printers in the SELECT.PRT file.
200 ; A090 - P5127, 6/17/88, changed default index for alternate keyboards
201 ; to be second (old) keyboard. J. Wright
202 ; A091 - P5142, 6/30/88, reduced memory allocation for panels from 64KB
203 ; to 62KB to allow more room for foreign versions of SELECT to
205 ; A092 - P5173, 7/15/88, added @BREAK=OFF" after :COMMON statement
206 ; in DOSSHELL.BAT file. S. Holahan
210 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
211 CODE SEGMENT PARA
PUBLIC 'CODE' ;AN000; Segment for CASS libraries
214 CODE_FAR
SEGMENT PARA
PUBLIC 'CODE' ;AN000; Segment for miscellaneous routines
215 CODE_FAR ENDS
;AN000;
217 _TEXT
segment byte public 'CODE' ;AN000;
219 _DATA
segment word public 'DATA' ;AN000;
221 CONST
segment word public 'CONST' ;AN000;
223 _BSS
segment word public 'BSS' ;AN000;
227 DATA SEGMENT BYTE PUBLIC 'DATA' ;AN000; Segment for Data values
230 SELECT
SEGMENT PARA
PUBLIC 'SELECT' ;AN000;
233 SERVICE
SEGMENT PARA
PUBLIC 'SERVICE' ;AN000; Segment for CAS_SERVICE routines
236 OUR_STACK
SEGMENT BYTE STACK ;AN000; Segment for Local Stack
237 DB 512 DUP('IBM ') ;AN000;
238 LAST_STACK EQU
$ ;AN000;
239 OUR_STACK ENDS
;AN000;
241 PARSER
SEGMENT PARA
PUBLIC 'PARSER' ;AN000; Segment for PARSE code
244 PCINPUT
SEGMENT PARA
PUBLIC 'PCINPUT' ;AN072;
247 ZSEG
SEGMENT PARA
PUBLIC 'ZSEG' ;AN000; Dummy segment for End-of-Code
250 AGROUP GROUP
CODE,CODE_FAR
,DATA,PARSER
,SERVICE
,SELECT
,OUR_STACK
,ZSEG
;AN000;
251 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
254 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
256 INCLUDE PANEL
.MAC
;AN000;
257 INCLUDE STRUC.INC ;AN000;
258 INCLUDE MACROS
.INC ;AN000;
259 INCLUDE SYSMSG
.INC ;AN000;
260 INCLUDE ROUT_EXT
.INC ;AN000;
261 INCLUDE EXT
.INC ;AN000;
262 INCLUDE PAN
-LIST
.INC ;AN000;
265 EXTRN DEALLOCATE_MEMORY_CALL
:FAR ;AN000;
266 EXTRN CHECK_VERSION
:NEAR ;AN000;
268 PUBLIC INSTALL
;AN000;
269 PUBLIC SYSDISPMSG
;AN000;
270 PUBLIC EXIT_SELECT
;AN000;
271 PUBLIC EXIT_SELECT2
;AN000;
272 PUBLIC INITIALIZATION
;AN000;
273 PUBLIC ABORT_SELECT
;AN000;
275 MSG_UTILNAME
<SELECT
> ;AN000;
276 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
279 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
280 SELECT
SEGMENT PARA
PUBLIC 'SELECT' ;AN000;
281 ASSUME
CS:SELECT
,DS:DATA,SS:our_STACK
;AN000;
283 OLD_STACK_SEG
DW ?
;AN000;
284 OLD_STACK_OFF
DW ?
;AN000;
286 INCLUDE CASEXTRN
.INC ;AN000;
288 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
292 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
293 INSTALL PROC
FAR ;AN000;
296 MOV OLD_STACK_SEG
,AX ;AN000;
297 MOV OLD_STACK_OFF
,SP ;AN000;
298 mov ax,our_stack
;AN000;
305 JMP INITIALIZATION
;AN000;
306 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
308 ; CODE TO LEAVE SELECT WITH!!!!
310 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
313 FIND_FILE S_AUTO_REBOOT
, 0 ;AN000;DT Make sure INSTALL disk in drive
315 .REPEAT ;AN000;DT make sure diskette
316 CLEAR_SCREEN
;AN000;DT with COMMAND.COM in drive
317 DISPLAY_MESSAGE
19 ;AN000;DT Insert INSTALL diskette
318 GET_FUNCTION FK_ENT
;AN000;DT
319 FIND_FILE S_AUTO_REBOOT
, 0 ;AN000;DT
320 .LEAVE < nc
> ;AN000;DT
321 HANDLE_ERROR ERR_DOS_DISK
, 2 ;AN000;DT
323 CLEAR_SCREEN2
;AN000;JW
326 EXIT_SELECT2: ;AN000;
328 DEALLOCATE_MEMORY
;AN000;free up allocated segment
330 CALL RESTORE_INT_23
;AN074;SEH restore ctrl-break before exiting
331 MOV AX,OLD_STACK_SEG
;AN000;
333 MOV SP,OLD_STACK_OFF
;AN000;
334 CALL CURSORON
;AN000;
338 ABORT_SELECT: ;AN000;exit without handling allocated memory
339 CALL RESTORE_INT_23
;AN074;SEH restore ctrl-break before exiting
340 MOV AX,OLD_STACK_SEG
;AN000;
342 MOV SP,OLD_STACK_OFF
;AN000;
343 CALL CURSORON
;AN000;
348 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
350 ; Message Retriever code inserted at this point....
352 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
353 MSG_SERVICES
<NOVERCHECKmsg
, FARmsg
, GETmsg
, DISPLAYmsg
, LOADmsg
> ;AN000;
354 MSG_SERVICES
<SELECT
.CLA
,SELECT
.CLB
> ;AN000;
355 MSG_SERVICES
<SELECT
.CL1
,SELECT
.CL2
> ;AN000;
356 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
358 ; Start of SELECT.EXE code
360 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
361 INITIALIZATION: ;AN000;
362 LOAD_MESSAGES
;AN000;
363 JMP CHECK_VERSION
;AN000;
364 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;