File: usecode_ff.txt

package info (click to toggle)
exult 1.12.0-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 43,608 kB
  • sloc: cpp: 169,917; xml: 7,400; yacc: 2,850; makefile: 2,419; java: 1,901; ansic: 1,654; lex: 673; sh: 539; objc: 416
file content (49 lines) | stat: -rw-r--r-- 1,496 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

Documentation for the STATIC/USECODE file.

PsudoBNF overview:
* LEFTVALUE = RIGHTVALUE is read as "LEFTVALUE consists of RIGHTVALUE".
* [TOKEN]* is read as "zero or more of TOKEN(s)".
* TOKEN = lots of text. "lots of text" is the details of what TOKEN is
  ususally data size, and vague description of relevance.

USECODE_FILE = [FUNCTION]*

FUNCTION = FUNCTION_HEADER DATASEGMENT CODESEGMENT

FUNCTION_HEADER = FUNCID FUNCSIZE

DATASEGMENT = DATASEG_SIZE DATASEG_DATA

CODESEGMENT = NUM_ARGS NUM_LOCALS EXTERNS USECODE_BLOCK

EXTERNS = NUM_EXTERNS EXTERN_LIST

FUNCID = (uint16) The "id" of the function. (Also referenced as "function
	number".)

FUNCSIZE = (uint16) The total size of the function (code + data). Am unsure
	if this also includes the "header".

DATASEG_SIZE = (uint16) The total size of the data segment (in number
	of bytes).

DATASEG_DATA = Consists of DATASEG_SIZE bytes of string data of the
	format "string\0" where \0 is the NULL byte.

NUM_ARGC = (uint16) The number of arguments to the function on the stack.

NUM_LOCALS = (uint16) The number of local "variables" used in the function.

NUM_EXTERNS = (uint16) The number of external function numbers in the
	external function list.

EXTERN_LIST = NUM_EXTERNS number of external numbers, each is (uint16) in
	size.

USECODE_BLOCK = [USECODE_CALL]+

USECODE_CALL = Consists of (ubyte8) opcode and a variable number of trailing
	bytes, depending upon which opcode.
	See: tools/ucxt/Docs/opcodes.txt for more information.