]> wirehaze git hosting - MS-DOS.git/blob - v4.0/src/CMD/NLSFUNC/NLSPARM.ASM

wirehaze git hosting

MZ is back!
[MS-DOS.git] / v4.0 / src / CMD / NLSFUNC / NLSPARM.ASM
1 PAGE ,132 ;\ f
2 TITLE NLSPARM.SAL - NLSFUNC SYSTEM COMMAND LINE PARSER
3 ;****************** START OF SPECIFICATIONS *****************************
4 ; MODULE NAME: NLSPARM.SAL
5 ;
6 ; DESCRIPTIVE NAME: Include the DOS system PARSER in the SEGMENT
7 ; configuration expected by the modules of NLSFUNC.
8 ;
9 ;FUNCTION: The common code of the DOS command line PARSER is optimized by
10 ; the setting of certain switches that cause the conditional
11 ; assembly of only the required portions of the common PARSER.
12 ; The segment registers are ASSUMED according to the type .EXE.
13 ;
14 ; ENTRY POINT: SYSPARSE, near
15 ;
16 ; INPUT:
17 ; ES - has seg id of the SEGMENT
18 ; that contains the input control blocks,
19 ; defined below.
20 ;
21 ; DI - offset into ES of the PARMS INPUT BLOCK
22 ;
23 ; DS - has seg id of the SEGMENT
24 ; that contains the DOS input COMMAND
25 ; string, which is originally presented at 81h
26 ; in the PSP.
27 ;
28 ; SI - offset into DS of the text of the DOS input COMMAND string
29 ; as originally presented at 81H in the PSP.
30 ;
31 ; DX - zero
32 ;
33 ; CX - ordinal value, intially zero, updated on each subsequent call
34 ; to the value returned in CX on the previous call.
35 ;
36 ; CS - points to the segment containing the
37 ; INCLUDE PARSE.SAL statement
38 ;
39 ; DS - also points to the segment containing the INCLUDE
40 ; PARSE.SAL statement.
41 ;
42 ; EXIT-NORMAL: Output registers:
43 ; AX - return code:
44 ; RC_No_Error equ 0 ; No error
45 ; RC_EOL equ -1 ; End of command line
46 ;
47 ; DX - Offset into ES of the selected RESULT BLOCK.
48 ; BL - terminated delimiter code
49 ; CX - new operand ordinal
50 ; SI - set past scanned operand
51 ;
52 ; EXIT-ERROR: Output registers:
53 ; AX - return code:
54 ; RC_Too_Many equ 1 ; Too many operands
55 ; RC_Op_Missing equ 2 ; Required operand missing
56 ; RC_Not_In_SW equ 3 ; Not in switch list provided
57 ; RC_Not_In_Key equ 4 ; Not in keyword list provided
58 ; RC_Out_Of_Range equ 6 ; Out of range specified
59 ; RC_Not_In_Val equ 7 ; Not in value list provided
60 ; RC_Not_In_Str equ 8 ; Not in string list provided
61 ; RC_Syntax equ 9 ; Syntax error
62 ;
63 ; INTERNAL REFERENCES:
64 ; ROUTINES: SYSPARSE:near (INCLUDEd in PARSE.SAL)
65 ;
66 ; DATA AREAS: none
67 ;
68 ; EXTERNAL REFERENCES:
69 ; ROUTINES: none
70 ;
71 ; DATA AREAS: control blocks pointed to by input registers.
72 ;
73 ; NOTES:
74 ; This module should be processed with the ASMUT preprocessor
75 ; with the re-alignment not requested, as:
76 ;
77 ; SALUT NLSPARM,NUL;
78 ;
79 ; To assemble these modules, the sequential
80 ; ordering of segments may be used.
81 ;
82 ; For LINK instructions, refer to the PROLOG of the main module,
83 ; NLSFUNC.SAL
84 ;
85 ; REVISION HISTORY: A000 Version 4.00: add PARSER, System Message Handler,
86 ;
87 ; COPYRIGHT: "The DOS NLSFUNC Utility"
88 ; "Version 4.00 (C)Copyright 1988 Microsoft
89 ; "Licensed Material - Program Property of Microsoft "
90 ;
91 ;****************** END OF SPECIFICATIONS *****************************
92 IF1
93 %OUT COMPONENT=NLSFUNC, MODULE=NLSPARM.SAL...
94 ENDIF
95 ; = = = = = = = = = = = =
96 HEADER <MACRO DEFINITION>
97 ; = = = = = = = = = = = =
98
99 HEADER MACRO TEXT
100 .XLIST
101 SUBTTL TEXT
102 .LIST
103 PAGE
104 ENDM
105
106 ; = = = = = = = = = = = =
107 HEADER <SYSPARSE - SYSTEM COMMAND LINE PARSER>
108 NLS_DATA SEGMENT BYTE PUBLIC 'DATA'
109
110 CAPSW EQU 1 ;SUPPORT FILENAME TBL CAPS
111 FARSW EQU 0 ;PARSER CALL FAR
112 FILESW EQU 1 ;CHECK FOR FILESPEC
113 SWSW EQU 0 ;SUPPRESS SUPPORT FOR SWITCHES
114 DATESW EQU 0 ;SUPPRESS DATE CHECKING
115 TIMESW EQU 0 ;SUPPRESS TIME CHECKING
116 CMPXSW EQU 0 ;SUPPRESS CHECKING COMPLEX LIST
117 NUMSW EQU 0 ;SUPPRESS CHECKING NUMERIC VALUE
118 KEYSW EQU 0 ;SUPPRESS KEYWORD SUPPORT
119 VAL1SW EQU 0 ;SUPPRESS SUPPORT OF VALUE DEFINITION 1
120 VAL2SW EQU 0 ;SUPPRESS SUPPORT OF VALUE DEFINITION 2
121 VAL3SW EQU 0 ;SUPPRESS SUPPORT OF VALUE DEFINITION 3
122 DRVSW EQU 0 ;SUPPORT OF DRIVE ONLY FORMAT
123 QUSSW EQU 0 ;SUPPRESS SUPPORT OF QUOTED STRING FORMAT
124
125 ; INCLUDE PSDATA.INC ;PARSE WORK AREA & EQUATES
126
127 NLS_DATA ENDS
128
129 NLS_INIT_CODE SEGMENT BYTE PUBLIC 'CODE'
130
131 ; ASSUME CS:NLS_INIT_CODE,DS:NLS_DATA
132 ASSUME CS:NLS_INIT_CODE,DS:nothing ; tsuneo
133
134 ; mov ax,NLS_DATA
135 ; mov ds,ax
136
137 ;INCSW equ 0
138
139
140
141
142 INCLUDE PARSE.ASM
143 PUBLIC SYSPARSE
144
145 NLS_INIT_CODE ENDS
146 ;NLS_DATA ENDS
147 END
148 \1a