summaryrefslogtreecommitdiff
path: root/v4.0/src/CMD/EXE2BIN/E2BPARSE.INC
diff options
context:
space:
mode:
Diffstat (limited to 'v4.0/src/CMD/EXE2BIN/E2BPARSE.INC')
-rw-r--r--v4.0/src/CMD/EXE2BIN/E2BPARSE.INC180
1 files changed, 180 insertions, 0 deletions
diff --git a/v4.0/src/CMD/EXE2BIN/E2BPARSE.INC b/v4.0/src/CMD/EXE2BIN/E2BPARSE.INC
new file mode 100644
index 0000000..9867a46
--- /dev/null
+++ b/v4.0/src/CMD/EXE2BIN/E2BPARSE.INC
@@ -0,0 +1,180 @@
1
2
3
4data segment public 'DATA'
5
6
7
8;
9;***************************************************************************
10; Equates
11;***************************************************************************
12;
13
14;Match Flags
15
16Numeric_Value equ 8000h ; ;AN000;
17Signed_Numeric_Value equ 4000h ; ;AN000;
18Simple_String equ 2000h ; ;AN000;
19Date_String equ 1000h ; ;AN000;
20Time_String equ 0800h ; ;AN000;
21Complex_List equ 0400h ; ;AN000;
22Filespec equ 0200h ; ;AN000;
23Drive_Only equ 0100h ; ;AN000;
24Quoted_String equ 0080h ; ;AN000;
25Ignore_Colon equ 0010h ; ;AN000;
26Repeats_Allowed equ 0002h ; ;AN000;
27Optional equ 0001h ; ;AN000;
28
29;Function_Flags
30
31File_Table_Capitalize equ 1 ; ;AN000;
32
33;Result buffer type returned
34rb_Number equ 1
35rb_List_Index equ 2
36rb_String equ 3
37rb_Complex equ 4
38rb_Filespec equ 5
39rb_Drive equ 6
40rb_Date equ 7
41rb_Time equ 8
42rb_Quoted_String equ 9
43
44
45;Extra delimeters and EOL
46
47Delimiters_Only equ 1 ; ;AN000;
48EOL_Or_Delimiters equ 2 ; ;AN000;
49
50Semi_Colon equ ";" ; ;AN000;
51Tab equ 09h ; ;AN000;
52Colon1 equ ":" ; ;AN000;
53NUL equ "0"
54
55;Parse Errors
56
57No_Error equ 0 ; ;AN000;
58Too_Many_Operands equ 1 ; ;AN000;
59Operand_Missing equ 2 ; ;AN000;
60Not_In_Switch_List equ 3 ; ;AN000;
61Not_In_Keyword_List equ 4 ; ;AN000;
62Out_Of_Range equ 6 ; ;AN000;
63Not_In_Value_List equ 7 ; ;AN000;
64Not_In_String_List equ 8 ; ;AN000;
65Syntax_Error equ 9 ; ;AN000;
66End_Of_Parse equ -1 ; ;AN000;
67
68;Other
69
70None equ 0 ; ;AN000;
71No_Error equ 0 ; ;AN000;
72Switch_Found equ 0FFFFh ; ;AN000;
73Range_Ok equ 1 ; ;AN000;
74Command_Line_Parms equ 81h ; ;AN000;
75
76;
77;*****************************************************************************
78; Parse Structures
79;*****************************************************************************
80;
81
82Control struc
83
84Match_Flags dw ?
85Function_Flags dw ?
86Result dw ?
87Values dw ?
88Num_Keywords db ?
89Keyword db ?
90
91Control ends
92
93File_Name_Return struc ; ;AN000;
94
95Drive_Type db 0 ; ;AN000;
96Drive_Item_Tag db 0 ; ;AN000;
97Synonym dw 0 ; ;AN000;
98String_Value_ptr db 0 ;File Name ;AN000;
99
100File_Name_Return ends ; ;AN000;
101
102
103;
104;**************************************************************************
105; Parse tables
106;**************************************************************************
107;
108
109Command_Line_Table label byte ; ;AN000;
110
111 dw Command_Control ;Point to next level ;AN000;
112 db Delimiters_Only ; ;AN000;
113 db 1 ; ;AN000;
114 db Semi_Colon ; ;AN000;
115
116
117;
118;**************************************************************************
119; Define Positionals, Switches and Keywords
120;**************************************************************************
121;
122
123Command_Control label byte ; ;AN000;
124
125 db 1,2 ;File names Positional (1 required) ;AN000;
126 dw Positional_Control1 ;Pointer to control table ;AN000;
127 dw Positional_Control2 ;Pointer to control table ;AN000;
128 db None ;no switches ;AN000;
129 db None ;No Keywords (maxk) ;AN000;
130
131;
132;**************************************************************************
133;Control Tables
134;**************************************************************************
135;
136
137Positional_Control1 label byte ; ;AN000;
138
139 dw Filespec ;Match_Flag ;AN000;
140 dw File_Table_Capitalize ;No function flags ;AN000;
141 dw File_Name_Buffer1 ;Where it will be returned ;AN000;
142 dw No_Value ;No value ranges defined ;AN000;
143 db None ;No defined switches/keywords ;AN000;
144
145Positional_Control2 label byte ; ;AN000;
146
147 dw Filespec+Optional ;Match_Flag ;AN000;
148
149 dw File_Table_Capitalize ;No function flags ;AN000;
150 dw File_Name_Buffer2 ;Where it will be returned ;AN000;
151 dw No_Value ;No value ranges defined ;AN000;
152 db None ;No defined switches/keywords ;AN000;
153
154No_Value label byte ; ;AN000;
155 db 0 ; ;AN000;
156
157;
158;************************************************************************
159; PARSE Return Buffers
160;************************************************************************
161;
162File_name_Buffer1 label byte ; ;AN000;
163
164rb_type1 db 0 ;type returned ;AN000;
165rb_item_tag1 db 0 ;matched item tag ;AN000;
166rb_synonym1 dw 0 ;found synonyms ;AN000;
167rb_string1_off dw 0 ;Offset of string ;AN000;
168rb_string1_seg dw 0 ;Offset of string ;AN000;
169
170File_name_Buffer2 label byte ; ;AN000;
171
172rb_type2 db 0 ;type returned ;AN000;
173rb_item_tag2 db 0 ;matched item tag ;AN000;
174rb_synonym2 dw 0 ;found synonyms ;AN000;
175rb_string2_off dw 0 ;Offset of string ;AN000;
176rb_string2_seg dw 0 ;Offset of string ;AN000;
177
178data ends
179
180 \ No newline at end of file