2 TITLE NLSPARM
.SAL - NLSFUNC SYSTEM COMMAND LINE PARSER
3 ;****************** START OF SPECIFICATIONS *****************************
4 ; MODULE NAME: NLSPARM.SAL
6 ; DESCRIPTIVE NAME: Include the DOS system PARSER in the SEGMENT
7 ; configuration expected by the modules of NLSFUNC.
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.
14 ; ENTRY POINT: SYSPARSE, near
17 ; ES - has seg id of the SEGMENT
18 ; that contains the input control blocks,
21 ; DI - offset into ES of the PARMS INPUT BLOCK
23 ; DS - has seg id of the SEGMENT
24 ; that contains the DOS input COMMAND
25 ; string, which is originally presented at 81h
28 ; SI - offset into DS of the text of the DOS input COMMAND string
29 ; as originally presented at 81H in the PSP.
33 ; CX - ordinal value, intially zero, updated on each subsequent call
34 ; to the value returned in CX on the previous call.
36 ; CS - points to the segment containing the
37 ; INCLUDE PARSE.SAL statement
39 ; DS - also points to the segment containing the INCLUDE
40 ; PARSE.SAL statement.
42 ; EXIT-NORMAL: Output registers:
44 ; RC_No_Error equ 0 ; No error
45 ; RC_EOL equ -1 ; End of command line
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
52 ; EXIT-ERROR: Output registers:
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
63 ; INTERNAL REFERENCES:
64 ; ROUTINES: SYSPARSE:near (INCLUDEd in PARSE.SAL)
68 ; EXTERNAL REFERENCES:
71 ; DATA AREAS: control blocks pointed to by input registers.
74 ; This module should be processed with the ASMUT preprocessor
75 ; with the re-alignment not requested, as:
79 ; To assemble these modules, the sequential
80 ; ordering of segments may be used.
82 ; For LINK instructions, refer to the PROLOG of the main module,
85 ; REVISION HISTORY: A000 Version 4.00: add PARSER, System Message Handler,
87 ; COPYRIGHT: "The DOS NLSFUNC Utility"
88 ; "Version 4.00 (C)Copyright 1988 Microsoft
89 ; "Licensed Material - Program Property of Microsoft "
91 ;****************** END OF SPECIFICATIONS *****************************
93 %
OUT COMPONENT
=NLSFUNC
, MODULE
=NLSPARM
.SAL...
95 ; = = = = = = = = = = = =
96 HEADER
<MACRO DEFINITION
>
97 ; = = = = = = = = = = = =
106 ; = = = = = = = = = = = =
107 HEADER
<SYSPARSE
- SYSTEM COMMAND LINE PARSER
>
108 NLS_DATA
SEGMENT BYTE PUBLIC 'DATA'
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
125 ; INCLUDE PSDATA.INC ;PARSE WORK AREA & EQUATES
129 NLS_INIT_CODE
SEGMENT BYTE PUBLIC 'CODE'
131 ; ASSUME CS:NLS_INIT_CODE,DS:NLS_DATA
132 ASSUME
CS:NLS_INIT_CODE
,DS:nothing
; tsuneo