summaryrefslogtreecommitdiff
path: root/v4.0/src/SELECT/SELECT0.ASM
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/SELECT/SELECT0.ASM
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/SELECT/SELECT0.ASM')
-rw-r--r--v4.0/src/SELECT/SELECT0.ASM372
1 files changed, 372 insertions, 0 deletions
diff --git a/v4.0/src/SELECT/SELECT0.ASM b/v4.0/src/SELECT/SELECT0.ASM
new file mode 100644
index 0000000..f7198c4
--- /dev/null
+++ b/v4.0/src/SELECT/SELECT0.ASM
@@ -0,0 +1,372 @@
1
2
3PAGE 60,132 ;AN000;
4NAME SELECT ;AN000;
5TITLE SELECT0 - DOS - SELECT.EXE ;AN000;
6SUBTTL select0.asm ;AN000;
7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8;
9; SELECT0.ASM : Copyright 1988 Microsoft
10;
11; DATE: July 4/87
12;
13; COMMENTS: Assemble with MASM 3.0 (using the /A option)
14;
15; Panel flow is defined in the following files:
16;
17; � SELECT1.ASM
18; � SELECT2.ASM
19; � SELECT3.ASM
20; � SELECT4.ASM
21; � SELECT5.ASM
22; � SELECT6.ASM
23;
24; CHANGE HISTORY:
25;
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.
29;
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.
40; S. H.
41; A013 - P3239, 1/27/88, changed text of prompt setting in DOSSHELL.BAT
42; file. J.W.
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
45; system. J.W.
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,
48; J.W.
49; A018 - D418, 2/4/88, removed the default /TEXT option on a model 25
50; or 30. S. H.
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.
54; S. H.
55; A021 - D442, 2/8/88, Added selection of SHARE when >32M partition
56; exists. J.W.
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
71; DOS 4.00 book. J.W.
72; A029 - P3529, 2/17/88, Corrected GRAPHICS parameter initialization
73; problem. J.W.
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.
86; S. H.
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
91; COMMAND.COM).
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
105; DOS 4.00.
106; A046 - D474, 3/16/88, changed the /E parameter for buffers to /X.
107;
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
112; read in.
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.
119;
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
129; with DOS 4.00.
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
133; read.
134; A060 - P4008, 3/30/88, added error message for help access when install
135; disk not in drive.
136; A061 - P4000, 3/30/88, corrected problem with allowable return key
137; strings.
138; A062 - P4059, 3/30/88, added FORMAT.COM to SELECT and OPERATING
139; diskettes; moved IFSFUNC from OPERATING to INSTALL diskette.
140;
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.
144;
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.
147;
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.
153;
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.
156;
157; A071 - P4428, 4/22/88, removed the /PRE parameter from the DOSSHELL.BAT.
158;
159; A072 - P3950, overlay PARSER and PCINPUT segments if on a 256KB machine.
160;
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
165; COPY".
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
174; Option screen.
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).
177;
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.
182;
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.
186;
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.
189;
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.
192;
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
204; run. S. Holahan
205; A092 - P5173, 7/15/88, added @BREAK=OFF" after :COMMON statement
206; in DOSSHELL.BAT file. S. Holahan
207;
208;
209;
210;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
211CODE SEGMENT PARA PUBLIC 'CODE' ;AN000; Segment for CASS libraries
212CODE ENDS ;AN000;
213 ;
214CODE_FAR SEGMENT PARA PUBLIC 'CODE' ;AN000; Segment for miscellaneous routines
215CODE_FAR ENDS ;AN000;
216 ;
217_TEXT segment byte public 'CODE' ;AN000;
218_TEXT ends ;AN000;
219_DATA segment word public 'DATA' ;AN000;
220_DATA ends ;AN000;
221CONST segment word public 'CONST' ;AN000;
222CONST ends ;AN000;
223_BSS segment word public 'BSS' ;AN000;
224_BSS ends ;AN000;
225 ;
226 ;
227DATA SEGMENT BYTE PUBLIC 'DATA' ;AN000; Segment for Data values
228DATA ENDS ;AN000;
229 ;
230SELECT SEGMENT PARA PUBLIC 'SELECT' ;AN000;
231SELECT ENDS ;AN000;
232
233SERVICE SEGMENT PARA PUBLIC 'SERVICE' ;AN000; Segment for CAS_SERVICE routines
234SERVICE ENDS ;AN000;
235 ;
236OUR_STACK SEGMENT BYTE STACK ;AN000; Segment for Local Stack
237 DB 512 DUP('IBM ') ;AN000;
238LAST_STACK EQU $ ;AN000;
239OUR_STACK ENDS ;AN000;
240 ;
241PARSER SEGMENT PARA PUBLIC 'PARSER' ;AN000; Segment for PARSE code
242PARSER ENDS ;AN000;
243
244PCINPUT SEGMENT PARA PUBLIC 'PCINPUT' ;AN072;
245PCINPUT ENDS ;AN072;
246 ;
247ZSEG SEGMENT PARA PUBLIC 'ZSEG' ;AN000; Dummy segment for End-of-Code
248ZSEG ENDS ;AN000;
249 ;
250AGROUP GROUP CODE,CODE_FAR,DATA,PARSER,SERVICE,SELECT,OUR_STACK,ZSEG ;AN000;
251;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
252;
253;
254;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
255.XLIST ;AN000;
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;
263.LIST ;AN000;
264 ;
265 EXTRN DEALLOCATE_MEMORY_CALL:FAR ;AN000;
266 EXTRN CHECK_VERSION:NEAR ;AN000;
267 ;
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;
274 ;
275 MSG_UTILNAME <SELECT> ;AN000;
276;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
277;
278;
279;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
280SELECT SEGMENT PARA PUBLIC 'SELECT' ;AN000;
281 ASSUME CS:SELECT,DS:DATA,SS:our_STACK ;AN000;
282 ;
283OLD_STACK_SEG DW ? ;AN000;
284OLD_STACK_OFF DW ? ;AN000;
285 ;
286 INCLUDE CASEXTRN.INC ;AN000;
287 ;
288;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
289;
290; Beginning of code
291;
292;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
293INSTALL PROC FAR ;AN000;
294 CLI ;AN000;
295 MOV AX,SS ;AN000;
296 MOV OLD_STACK_SEG,AX ;AN000;
297 MOV OLD_STACK_OFF,SP ;AN000;
298 mov ax,our_stack ;AN000;
299 mov ss,ax ;AN000;
300 mov sp,512*4 ;AN000;
301 STI ;AN000;
302 ;
303 MOV AX,DATA ;AN000;
304 MOV DS,AX ;AN000;
305 JMP INITIALIZATION ;AN000;
306;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
307;
308; CODE TO LEAVE SELECT WITH!!!!
309;
310;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
311EXIT_SELECT: ;AN000;
312 ;
313 FIND_FILE S_AUTO_REBOOT, 0 ;AN000;DT Make sure INSTALL disk in drive
314 .IF < c > ;AN000;DT
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
322 .UNTIL ;AN000;DT
323 CLEAR_SCREEN2 ;AN000;JW
324 .ENDIF ;AN000;
325 ;
326EXIT_SELECT2: ;AN000;
327 ;
328 DEALLOCATE_MEMORY ;AN000;free up allocated segment
329 .IF < NC > ;AN000;
330 CALL RESTORE_INT_23 ;AN074;SEH restore ctrl-break before exiting
331 MOV AX,OLD_STACK_SEG ;AN000;
332 MOV SS,AX ;AN000;
333 MOV SP,OLD_STACK_OFF ;AN000;
334 CALL CURSORON ;AN000;
335 MOV AX,4C00H ;AN000;
336 INT 21H ;AN000;
337 .ELSE ;AN000;
338ABORT_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;
341 MOV SS,AX ;AN000;
342 MOV SP,OLD_STACK_OFF ;AN000;
343 CALL CURSORON ;AN000;
344 MOV AX,4C00H ;AN000;
345 INT 21H ;AN000;
346 .ENDIF ;AN000;
347INSTALL ENDP ;AN000;
348;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
349;
350; Message Retriever code inserted at this point....
351;
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
357;
358; Start of SELECT.EXE code
359;
360;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
361INITIALIZATION: ;AN000;
362 LOAD_MESSAGES ;AN000;
363 JMP CHECK_VERSION ;AN000;
364;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
365
366
367SELECT ENDS ;AN000;
368
369include msgdcl.inc
370
371 END INSTALL ;AN000;
372