1 /******************************************************************************
2 *
3 * Copyright (C) 2006, The Gentee Group. All rights reserved.
4 * This file is part of the Gentee open source project - http://www.gentee.com.
5 *
6 * THIS FILE IS PROVIDED UNDER THE TERMS OF THE GENTEE LICENSE ("AGREEMENT").
7 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES RECIPIENTS
8 * ACCEPTANCE OF THE AGREEMENT.
9 *
10 * ID: cmdlist 20.10.06 0.0.A.
11 *
12 * Author: Alexey Krivonogov ( gentee )
13 *
14 * Summary: The list of the embedded byte-code commands. It is used for
15 generating cmdlist.h and cmdlist.с files
16 *
17 ******************************************************************************/
18
19 <CNone comment = "Error command" type />
20 <TInt comment = "int type" type />
21 <TUint comment = "uint type" type />
22 <TByte comment = "byte type" type />
23 <TUbyte comment = "ubyte type" type />
24 <TShort comment = "short type" type />
25 <TUshort comment = "ushort type" type />
26 <TFloat comment = "float type" type />
27 <TDouble comment = "double type" type />
28 <TLong comment = "long type" type />
29 <TUlong comment = "ulong type" type />
30 <TReserved comment = "reserved type" type />
31 <TBuf comment = "buf type" type />
32 <TStr comment = "str type" type />
33 <TArr comment = "arr type" type />
34 <TCollection comment = "collection type" type />
35 <TAny comment = "any type" type />
36 <TFordata comment = "foreach type" type />
37 <CNop comment = "The command does nothing" />
38 <CGoto comment = "The unconditional jump." cmdshift = 1 >
39 <summary>cmd + 1 uint - absolute position in the byte-code</>
40 </>
41 <CGotonocls comment = "The unconditional jump without clearing stack."
42 cmdshift = 1 >
43 </>
44 <CIfze comment = "The conditional jump" cmdshift = 1 >
45 <summary>
46 if top (uint) == 0 then go to cmd + 1 ( uint ) - absolute position in
47 the byte-code
48 </>
49 </>
50 <CIfznocls comment = "The conditional jump without clearing stack"
51 cmdshift = 1 topshift = -1 >
52 </>
53 <CIfnze comment = "The conditional jump" cmdshift = 1>
54 <summary>
55 if top (uint) != 0 then go to cmd + 1 ( uint ) - absolute position in
56 the byte-code
57 </>
58 </>
59 <CIfnznocls comment = "The conditional jump without clearing stack."
60 cmdshift = 1 topshift = -1 ></>
61 <CByload comment = "The next ubyte push into stack. GE only" topshift = 0
62 cmdshift = 0 ></>
63 <CShload comment = "The next ushort push into stack. GE only" topshift = 0
64 cmdshift = 0 ></>
65 <CDwload comment = "The next uint push into stack." topshift = 1
66 cmdshift = 1 ></>
67 <CCmdload comment = "The next ID push into stack." topshift = 1
68 cmdshift = 1 ></>
69 <CResload comment = "The next ID (resource) push into stack." topshift = 1
70 cmdshift = 1 ></>
71 <CQwload comment = "The next ulong push into stack." topshift = 2
72 cmdshift = 2 ></>
73 <CDwsload comment = "The next uints ( cmd 1 ) ( cmd 2 ) push into the stack"
74 topshift = 0 cmdshift = 0 ></>
75 <CVarload comment = "Load the value of parameter or variable with number ( cmd 1)"
76 topshift = 1 cmdshift = 1 ></>
77 <CVarptrload comment = "Load the pointer to value of parameter or variable with number ( cmd 1)"
78 topshift = 1 cmdshift = 1 ></>
79 <CDatasize comment = "Load the pointer to the next data and the size"
80 topshift = 0 ></>
81 <CLoglongtrue comment = "Return 1 if ulong in stack is not zero"
82 topshift = -1 ></>
83 <CLognot comment = "Logical not" topshift = 0 ></>
84 <CLoglongnot comment = "Logical NOT for long ulong"
85 topshift = -1 ></>
86 <CDup comment = "Duplicate top value" topshift = 1 ></>
87 <CDuplong comment = "Duplicate two top value" topshift = 2 ></>
88 <CTop comment = "Return the pointer to top" topshift = 1 ></>
89 <CPop comment = "Delete the top value" topshift = -1 ></>
90 <CGetUB comment = " * ( pubyte ) " topshift = 0 ></>
91 <CGetB comment = " * ( pbyte ) " topshift = 0 ></>
92 <CGetUS comment = " * ( pushort ) " topshift = 0 ></>
93 <CGetS comment = " * ( pshort ) " topshift = 0 ></>
94 <CGetI comment = " * ( puint && pint && float ) " topshift = 0 ></>
95 <CGetL comment = " * ( pulong && plong && double ) " topshift = 1 ></>
96 <CSetUB comment = " * ( pubyte ) = " topshift = -1 ></>
97 <CSetB comment = " * ( pbyte ) = " topshift = -1 ></>
98 <CSetUS comment = " * ( pushort ) = " topshift = -1 ></>
99 <CSetS comment = " * ( pshort ) = " topshift = -1 ></>
100 <CSetI comment = " * ( puint && pint && float ) = " topshift = -1 ></>
101 <CSetL comment = " * ( pulong && plong && double ) = " topshift = -1 ></>
102 <CAddUIUI comment = " + " topshift = -1 ></>
103 <CSubUIUI comment = " - " topshift = -1 ></>
104 <CMulUIUI comment = " * " topshift = -1 ></>
105 <CDivUIUI comment = " / " topshift = -1 ></>
106 <CModUIUI comment = " % " topshift = -1 ></>
107 <CAndUIUI comment = " & " topshift = -1 ></>
108 <COrUIUI comment = " | " topshift = -1 ></>
109 <CXorUIUI comment = " ^ " topshift = -1 ></>
110 <CLeftUIUI comment = " << " topshift = -1 ></>
111 <CRightUIUI comment = " >> " topshift = -1 ></>
112 <CLessUIUI comment = " < " topshift = -1 ></>
113 <CGreaterUIUI comment = " > " topshift = -1 ></>
114 <CEqUIUI comment = " == " topshift = -1 ></>
115 <CNotUI comment = " ~ " topshift = 0 ></>
116 <CIncLeftUI comment = " ++i " topshift = 0 ></>
117 <CIncRightUI comment = " i++ " topshift = 0 ></>
118 <CDecLeftUI comment = " --i " topshift = 0 ></>
119 <CDecRightUI comment = " i-- " topshift = 0 ></>
120 <CAddUI comment = " += " topshift = -1 ></>
121 <CSubUI comment = " -= " topshift = -1 ></>
122 <CMulUI comment = " *= " topshift = -1 ></>
123 <CDivUI comment = " /= " topshift = -1 ></>
124 <CModUI comment = " %= " topshift = -1 ></>
125 <CAndUI comment = " &= " topshift = -1 ></>
126 <COrUI comment = " |= " topshift = -1 ></>
127 <CXorUI comment = " ^= " topshift = -1 ></>
128 <CLeftUI comment = " <<= " topshift = -1 ></>
129 <CRightUI comment = " >>= " topshift = -1 ></>
130 <CVarsInit comment = "Initialize variables in block cmd1 "
131 topshift = 0 cmdshift = 1 ></>
132 <CGetText comment = "Get current output of text function" topshift = 1></>
133 <CSetText comment = "Print string to current output of text function"
134 topshift = -1></>
135 <CPtrglobal comment = "Get to the global variable" topshift = 1
136 cmdshift = 1></>
137 <CSubcall comment = "Call a subfunc cmd 1 - goto" cmdshift = 1 />
138 <CSubret comment = "The number of returned uint cmd 1" cmdshift = 1 />
139 <CSubpar comment = "Parameters of subfunc. cmd 1 - Set block" cmdshift = 1 />
140 <CSubreturn comment = "Return from a subfunc" />
141 <CCmdcall comment = "Call a funcion" cmdshift = 1 ></>
142 <CCallstd comment = "Call a stdcall or cdecl funcion" cmdshift = 2 topshift = 1></>
143 <CReturn comment = "Return from the function."></>
144 <CAsm comment = "Assembler" cmdshift = 1 ></>
145 <CDbgTrace comment = "Debug line tracing" topshift = -1 ></>
146 <CDbgFunc comment = "Debug func entering" topshift = -2 ></>
147
148 <- Pseudo stack commands ->
149
150 <CMulII comment = " * " topshift = -1 ></>
151 <CDivII comment = " / " topshift = -1 ></>
152 <CModII comment = " % " topshift = -1 ></>
153 <CLeftII comment = " << " topshift = -1 ></>
154 <CRightII comment = " >> " topshift = -1 ></>
155 <CSignI comment = " change sign " topshift = 0 ></>
156 <CLessII comment = " < " topshift = -1 ></>
157 <CGreaterII comment = " > " topshift = -1 ></>
158 <CMulI comment = " *= " topshift = -1 ></>
159 <CDivI comment = " /= " topshift = -1 ></>
160 <CModI comment = " %= " topshift = -1 ></>
161 <CLeftI comment = " <<= " topshift = -1 ></>
162 <CRightI comment = " >>= " topshift = -1 ></>
163 <CMulB comment = " *= " topshift = -1 ></>
164 <CDivB comment = " /= " topshift = -1 ></>
165 <CModB comment = " %= " topshift = -1 ></>
166 <CLeftB comment = " <<= " topshift = -1 ></>
167 <CRightB comment = " >>= " topshift = -1 ></>
168 <CMulS comment = " *= " topshift = -1 ></>
169 <CDivS comment = " /= " topshift = -1 ></>
170 <CModS comment = " %= " topshift = -1 ></>
171 <CLeftS comment = " <<= " topshift = -1 ></>
172 <CRightS comment = " >>= " topshift = -1 ></>
173 <Cd2f comment = "double 2 float" topshift = -1 ></>
174 <Cd2i comment = "double 2 int" topshift = -1 ></>
175 <Cd2l comment = "double 2 long" topshift = 0 ></>
176 <Cf2d comment = "float 2 double" topshift = 1 ></>
177 <Cf2i comment = "float 2 int" topshift = 0 ></>
178 <Cf2l comment = "float 2 long" topshift = 1 ></>
179 <Ci2d comment = "int 2 double" topshift = 1 ></>
180 <Ci2f comment = "int 2 float" topshift = 0 ></>
181 <Ci2l comment = "int 2 long" topshift = 1 ></>
182 <Cl2d comment = "long 2 double" topshift = 0 ></>
183 <Cl2f comment = "long 2 float" topshift = -1 ></>
184 <Cl2i comment = "long 2 int" topshift = -1 ></>
185 <Cui2d comment = "uint 2 double" topshift = 1 ></>
186 <Cui2f comment = "uint 2 float" topshift = 0 ></>
187 <Cui2l comment = "uint 2 long" topshift = 1 ></>
188
189 <CAddULUL comment = "+" topshift = -2 ></>
190 <CSubULUL comment = "-" topshift = -2 ></>
191 <CMulULUL comment = "*" topshift = -2 ></>
192 <CDivULUL comment = "/" topshift = -2 ></>
193 <CModULUL comment = "%" topshift = -2 ></>
194 <CAndULUL comment = "&" topshift = -2 ></>
195 <COrULUL comment = "|" topshift = -2 ></>
196 <CXorULUL comment = "^" topshift = -2 ></>
197 <CLeftULUL comment = "<<" topshift = -2 ></>
198 <CRightULUL comment = ">>" topshift = -2 ></>
199 <CLessULUL comment = "<" topshift = -3 ></>
200 <CGreaterULUL comment = ">" topshift = -3 ></>
201 <CEqULUL comment = "==" topshift = -3 ></>
202 <CNotUL comment = "~" topshift = 0 ></>
203
204 <CIncLeftUL comment = "++" topshift = 1 ></>
205 <CIncRightUL comment = "++" topshift = 1 ></>
206 <CDecLeftUL comment = "--" topshift = 1 ></>
207 <CDecRightUL comment = "--" topshift = 1 ></>
208 <CAddUL comment = "+=" topshift = -1 ></>
209 <CSubUL comment = "-=" topshift = -1 ></>
210 <CMulUL comment = "*=" topshift = -1 ></>
211 <CDivUL comment = "/=" topshift = -1 ></>
212 <CModUL comment = "%" topshift = -1 ></>
213 <CAndUL comment = "&=" topshift = -1 ></>
214 <COrUL comment = "|=" topshift = -1 ></>
215 <CXorUL comment = "&=" topshift = -1 ></>
216 <CLeftUL comment = "<<=" topshift = -1 ></>
217 <CRightUL comment = ">>=" topshift = -1 ></>
218
219 <CMulLL comment = "*" topshift = -2 ></>
220 <CDivLL comment = "/" topshift = -2 ></>
221 <CModLL comment = "%" topshift = -2 ></>
222 <CLeftLL comment = "<<=" topshift = -2 ></>
223 <CRightLL comment = ">>=" topshift = -2 ></>
224 <CSignL comment = "sign" topshift = 0 ></>
225 <CLessLL comment = "<" topshift = -3 ></>
226 <CGreaterLL comment = ">" topshift = -3 ></>
227
228 <CMulL comment = "*=" topshift = -1 ></>
229 <CDivL comment = "/=" topshift = -1 ></>
230 <CModL comment = "%=" topshift = -1 ></>
231 <CLeftL comment = "<<=" topshift = -1 ></>
232 <CRightL comment = ">>=" topshift = -1 ></>
233
234 <CAddFF comment = "+" topshift = -1 ></>
235 <CSubFF comment = "-" topshift = -1 ></>
236 <CMulFF comment = "*" topshift = -1 ></>
237 <CDivFF comment = "/" topshift = -1 ></>
238 <CSignF comment = "sign" topshift = 0 ></>
239 <CLessFF comment = "<" topshift = -1 ></>
240 <CGreaterFF comment = ">" topshift = -1 ></>
241 <CEqFF comment = "==" topshift = -1 ></>
242
243 <CIncLeftF comment = "++" topshift = 0 ></>
244 <CIncRightF comment = "++" topshift = 0 ></>
245 <CDecLeftF comment = "--" topshift = 0 ></>
246 <CDecRightF comment = "--" topshift = 0 ></>
247 <CAddF comment = "+=" topshift = -1 ></>
248 <CSubF comment = "-=" topshift = -1 ></>
249 <CMulF comment = "*=" topshift = -1 ></>
250 <CDivF comment = "/=" topshift = -1 ></>
251
252 <CAddDD comment = "+" topshift = -2 ></>
253 <CSubDD comment = "-" topshift = -2 ></>
254 <CMulDD comment = "*" topshift = -2 ></>
255 <CDivDD comment = "/" topshift = -2 ></>
256 <CSignD comment = "sign" topshift = 0 ></>
257 <CLessDD comment = "<" topshift = -3 ></>
258 <CGreaterDD comment = ">" topshift = -3 ></>
259 <CEqDD comment = "==" topshift = -3 ></>
260
261 <CIncLeftD comment = "++" topshift = 1 ></>
262 <CIncRightD comment = "++" topshift = 1 ></>
263 <CDecLeftD comment = "--" topshift = 1 ></>
264 <CDecRightD comment = "--" topshift = 1 ></>
265 <CAddD comment = "+=" topshift = -1 ></>
266 <CSubD comment = "-=" topshift = -1 ></>
267 <CMulD comment = "*=" topshift = -1 ></>
268 <CDivD comment = "/=" topshift = -1 ></>
269
270 <CIncLeftUB comment = "++" topshift = 0 ></>
271 <CIncRightUB comment = "++" topshift = 0 ></>
272 <CDecLeftUB comment = "--" topshift = 0 ></>
273 <CDecRightUB comment = "--" topshift = 0 ></>
274 <CAddUB comment = "+=" topshift = -1 ></>
275 <CSubUB comment = "-=" topshift = -1 ></>
276 <CMulUB comment = "*=" topshift = -1 ></>
277 <CDivUB comment = "/=" topshift = -1 ></>
278 <CModUB comment = "%=" topshift = -1 ></>
279 <CAndUB comment = "&=" topshift = -1 ></>
280 <COrUB comment = "|=" topshift = -1 ></>
281 <CXorUB comment = "^=" topshift = -1 ></>
282 <CLeftUB comment = "<<=" topshift = -1 ></>
283 <CRightUB comment = ">>=" topshift = -1 ></>
284 <CIncLeftUS comment = "++" topshift = 0 ></>
285 <CIncRightUS comment = "++" topshift = 0 ></>
286 <CDecLeftUS comment = "--" topshift = 0 ></>
287 <CDecRightUS comment = "--" topshift = 0 ></>
288 <CAddUS comment = "+=" topshift = -1 ></>
289 <CSubUS comment = "-=" topshift = -1 ></>
290 <CMulUS comment = "*=" topshift = -1 ></>
291 <CDivUS comment = "/=" topshift = -1 ></>
292 <CModUS comment = "%=" topshift = -1 ></>
293 <CAndUS comment = "&=" topshift = -1 ></>
294 <COrUS comment = "|=" topshift = -1 ></>
295 <CXorUS comment = "^=" topshift = -1 ></>
296 <CLeftUS comment = "<<=" topshift = -1 ></>
297 <CRightUS comment = ">>=" topshift = -1 ></>
298
299 <CCollectadd comment = "Run-time loading collection" cmdshift = 1 />
300
301 <-
302
303
304 CVarloadoff comment = "Load the pointer to value of parameter or variable with number ( cmd 1) + the offset ( cmd 2 )"
305 topshift = 1 cmdshift = 2 >
306
307 SFinally, // Метка перехода по исключению
308 SSetXDim:
309 SGetXDim:
310 SPtrToStack, // Записать данные в стэк из указателя
311
312 </->
Редактировать