1 .\" Process with groff -man -Tascii file.3
2 .TH QCVM 1 2012-18-12 "" "gmqcc Manual"
4 qcvm \- A standalone QuakeC VM binary executor.
7 [\fIOPTIONS\fR] [\fIPARAMS\fR] [\fIfile\fR]
9 qcvm is an executor for QuakeC VM binary files created using a QC
10 compiler such as gmqcc(1) or fteqcc. It provides a small set of
11 builtin functions, and by default executes the \fImain\fR function if
12 there is one. Some options useful for debugging are available as well.
14 There are 2 types of options. Options for the executor, and parameter
15 options used to add parameters which are passed to the main function
19 Show a usage message and exit.
22 Trace the execution. Each instruction will be printed to stdout before
26 Perform some profiling. This is currently not really implemented, the
27 option is available nonetheless.
30 Print information from the program's header instead of executing.
33 Disassemble the program by function instead of executing.
35 .BI "-disasm-func" function
36 Search for and disassemble the given function.
39 List all entries from the program's defs-section. Effectively
40 listing all the global variables of the program.
41 This option disables execution.
44 List all entries from the program's fields-section. Listing all
45 entity-fields declared in the program.
46 This option disables execution.
49 List functions and some information about their parameters.
50 This option disables execution.
52 .BI "-vector """ "x y z" """"
53 Append a vector parameter to be passed to \fImain\fR.
56 Append a float parameter to be passed to \fImain\fR.
58 .BI "-string """ "text" """"
59 Append a string parameter to be passed to \fImain\fR.
61 The following builtin functions are available:
64 .RI "1) " void " print(" string... ") = " "#1" ;
66 Print the passed strings to stdout. At most 8 strings are allowed.
69 .RI "2) " string " ftos(" float ") = " "#2" ;
71 Convert a float to a string.
74 .RI "3) " entity " spawn() = " "#3" ;
79 .RI "4) " void " remove(" entity ") = " "#4" ;
84 .RI "5) " string " vtos(" vector ") = " "#5" ;
86 Convert a vector to a string.
89 .RI "6) " void " error(" string... ") = " "#6" ;
91 Print at most 8 strings to stdout and then exit with an error.
94 .RI "7) " float " vlen(" vector ") = " "#7" ;
96 Get the length of a vector.
99 .RI "8) " string " etos(" entity ") = " "#8" ;
101 Get the entity ID as string.
104 .RI "9) " float " stof(" string ") = " "#9" ;
106 Convert a string to a float.
109 .RI "10) " string " strcat(" string ", " string ") = " "#10" ;
111 Concatenate two strings, returning a tempstring.
114 .RI "11) " float " strcmp (" string ", " string ") = " "#11" ;
116 .RI " " float " strncmp(" string ", " string ", " float ") = " "#11" ;
118 Compare two strings. Returns the same as the corresponding C functions.
121 Please report bugs on <http://github.com/graphitemaster/gmqcc/issues>,
122 or see <http://graphitemaster.github.com/gmqcc> on how to contact us.
126 See <http://graphitemaster.github.com/gmqcc>.