summaryrefslogtreecommitdiff
path: root/v4.0/src/CMD/RECOVER/RECPARSE.INC
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/CMD/RECOVER/RECPARSE.INC')
-rw-r--r--v4.0/src/CMD/RECOVER/RECPARSE.INC177
1 files changed, 177 insertions, 0 deletions
diff --git a/v4.0/src/CMD/RECOVER/RECPARSE.INC b/v4.0/src/CMD/RECOVER/RECPARSE.INC
new file mode 100644
index 0000000..dbe4712
--- /dev/null
+++ b/v4.0/src/CMD/RECOVER/RECPARSE.INC
@@ -0,0 +1,177 @@
1
2const segment public para 'const' ;AC000;bgb
3;***************************************************************************
4; Equates
5;***************************************************************************
6;
7;Match Flags
8Numeric_Value equ 8000h ; AN000
9Signed_Numeric_Value equ 4000h ; AN000
10Simple_String equ 2000h ; AN000
11Date_String equ 1000h ; AN000
12Time_String equ 0800h ; AN000
13Complex_List equ 0400h ; AN000
14Filespec equ 0200h ; AN000
15Drive_Only equ 0100h ; AN000
16Quoted_String equ 0080h ; AN000
17Ignore_Colon equ 0010h ; AN000
18Repeats_Allowed equ 0002h ; AN000
19Optional equ 0001h ; AN000
20
21;Function_Flags
22
23File_Table_Capitalize equ 1 ; AN000
24Char_Table_Capitalize equ 2 ; AN000
25Remove_Colon equ 10h ; AN000
26
27;Extra delimeters and EOL
28
29No_Extra_Delimiters equ 00h ; AN000;SM
30Delimiters_Only equ 1 ; AN000
31EOL_Or_Delimiters equ 2 ; AN000
32
33Semi_Colon equ ";" ; AN000
34Tab equ 09h ; AN000
35Colon equ ":" ; AN000
36
37
38;Parse Errors
39
40No_Error equ 0 ; AN000
41Too_Many_Operands equ 1 ; AN000
42Operand_Missing equ 2 ; AN000
43Not_In_Switch_List equ 3 ; AN000
44Not_In_Keyword_List equ 4 ; AN000
45Out_Of_Range equ 6 ; AN000
46Not_In_Value_List equ 7 ; AN000
47Not_In_String_List equ 8 ; AN000
48Syntax_Error equ 9 ; AN000
49End_Of_Parse equ -1 ; AN000
50
51;Return types
52
53Type_Reserved equ 0 ; ;AN000;
54Type_Number equ 1 ; ;AN000;
55Type_List_Index equ 2 ; ;AN000;
56Type_String equ 3 ; ;AN000;
57Type_Complex equ 4 ; ;AN000;
58Type_Filespec equ 5 ; ;AN000;
59Type_Drive equ 6 ; ;AN000;
60Type_Date equ 7 ; ;AN000;
61Type_Time equ 8 ; ;AN000;
62Type_Quoted_String equ 9 ; ;AN000;
63
64
65;Other
66
67None equ 0 ; AN000
68No_Error equ 0 ; AN000
69Switch_Found equ 0FFFFh ; AN000
70Range_Ok equ 1 ; AN000
71Command_Line_Parms equ 81h ; AN000
72const ends ;AC000;bgb
73
74data segment public para 'DATA' ;AC000;bgb
75;***************************************************************************** ;AN000;bgb
76;***************************************************************************** ;AN000;bgb
77; Parse Tables ;AN000;bgb
78;***************************************************************************** ;AN000;bgb
79;***************************************************************************** ;AN000;bgb
80; ;AN000;bgb
81;The following parse control block can be used for any command which ;AN000;bgb
82;needs only one optional file specification an operand. Returns a ;AN000;bgb
83;pointer to the unverified string in PARSE1_OUTPUT. Currently used ;AN000;bgb
84;for the RECOVER command. ;AN000;bgb
85;***************************************************************************** ;AN000;bgb
86;;;;db 'PARSE TABLE AREA' ;AN000;bgb
87 public parms_input_block, parms_ext_block, control_block, value_list_block
88 public results_block, parse_type, parse_code, parse_addr,
89 ;AN000;bgb
90;***************************************************************************** ;AN000;bgb
91; This is the parms input block pointed to by es:di before calling sysparse. ;AN000;bgb
92; it is the top level table. ;AN000;bgb
93parms_input_block LABEL BYTE ;AN000;bgb
94 DW dg:parms_ext_block ; addr of parms extension block ;AN000;bgb
95 DB 0 ; no delimiters or eol chars ;AN000;bgb
96 ;AN000;bgb
97;***************************************************************************** ;AN000;bgb
98; This is the parms extension block pointed to by the parms input block. ;AN000;bgb
99; it defines the number and type of parameters allowed in the command line. ;AN000;bgb
100parms_ext_block LABEL BYTE ;AN000;bgb
101 DB 1,1 ; only one positional parm ;AN000;bgb
102 DW dg:control_block ; addr of positional control block ;AN000;bgb
103 DB 0 ; no switches ;AN000;bgb
104 DB 0 ; no keywords ;AN000;bgb
105; ;AN000;bgb
106;PARSE control block for an optional file specification (upper cased) ;AN000;bgb
107;or drive number ;AN000;bgb
108; ;AN000;bgb
109;***************************************************************************** ;AN000;bgb
110; This is the control block for either drive letter "c:", or filename.ext, or ;AN000;bgb
111; both "c:filename.ext" entered in the command line. it is pointed to by the ;AN000;bgb
112; parms extension block. ;AN000;bgb
113control_block LABEL BYTE ;AN000;bgb
114 Dw $p_file_spc+$p_drv_only ; allowable return values ;AN000;bgb
115 ; 0200 = filespec ;AN000;bgb
116 ; 0100 = drive only ;AN000;bgb
117 DW 1 ; capitalize - file table ;AN000;bgb
118 DW dg:results_block ; points to reults block ;AN000;bgb
119 DW dg:value_list_block ; point to valu list block ;AN000;bgb
120 DB 0 ; no keyword synonyms ;AN000;bgb
121; ;AN000;bgb
122;Indicates no value list for PARSE. ;AN000;bgb
123;***************************************************************************** ;AN000;bgb
124; This is the value list block pointed to by the control block. This table is ;AN000;bgb
125; used to define the type of numeric or string parameters expected. Since no ;AN000;bgb
126; parameters with numerics or strings are used, this block is set to zero. ;AN000;bgb
127value_list_block DW 0 ;AN000; no values ;AN000;bgb
128 ;AN000;bgb
129; ;AN000;bgb
130;Common output blocks for PARSE number, complex, or string values. ;AN000;bgb
131;***************************************************************************** ;AN000;bgb
132; This is the results block pointed to by the control block. ;AN000;bgb
133; both "c:filename.ext" entered in the command line. it is pointed to by the ;AN000;bgb
134; parms extension block. ;AN000;bgb
135results_block LABEL BYTE ;AN000; ;AN000;bgb
136PARSE_TYPE DB 0 ; type of parm returned ;AN000;bgb
137PARSE_CODE DB 0 ; matched item tag / return valu ;AN000;bgb
138PARSE_SYN DW 0 ; es offset of synonym ;AN000;bgb
139PARSE_ADDR DD 0 ; either a numeric value, or ;AN000;bgb
140 dd 0 ;parser puts in too many;the offset of string value ;AN000;bgb
141
142;;;;DB 'PARSE AREA ENDS'
143data ends ;AN000;bgb
144 ;AN000;bgb
145; ;AN000;
146code segment PUBLIC para 'CODE' ;AC000;bgb ;AN000;
147;***************************************************************************** ;AN000;
148; SysParse Routines ;AN000;
149;***************************************************************************** ;AN000;
150FarSW equ Not_Include ; ;AN000;
151DateSW equ Not_Include ; ;AN000;
152TimeSW equ Not_Include ; ;AN000;
153FileSW equ Do_Include ; ;AN000;
154CAPSW equ Not_Include ; ;AN000;
155CmpxSW equ Not_Include ; ;AN000;
156NumSW equ Not_Include ; ;AN000;
157KeySW equ Not_Include ; ;AN000;
158SwSW equ Not_Include ; ;AN000;
159Val1SW equ Not_Include ; ;AN000;
160Val2SW equ Not_Include ; ;AN000;
161Val3SW equ Not_Include ; ;AN000;
162DrvSW equ Do_Include ; ;AN000;
163QusSW equ Not_Include ;
164basesw equ 1 ;use ds as the default register ;an040;bgb
165incsw equ 0 ;include psdata myself ;an040;bgb
166code ends ;an040;bgb
167 ;an040;bgb
168 ;an040;bgb
169data segment PUBLIC para 'DATA' ;an040;bgb
170include psdata.inc ;an040;bgb
171data ends ;an040;bgb
172 ;an040;bgb
173code segment PUBLIC para 'CODE' ;an040;bgb
174pathlabl parser ;an040;bgb
175INCLUDE PARSE.ASM ;AN000; ;an040;bgb
176pathlabl parser ;an040;bgb
177code ends ;an040;bgb