From dc0857bfd8c91a57372d971ff0f5cd166d90d360 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sat, 24 Nov 2012 21:03:13 +0000 Subject: [PATCH] More documentation --- doc.html | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++- index.html | 2 +- 2 files changed, 96 insertions(+), 2 deletions(-) diff --git a/doc.html b/doc.html index 3032820..3c80e24 100644 --- a/doc.html +++ b/doc.html @@ -33,6 +33,7 @@
  • Compiler Documentation
  • Building Documentation
  • Testsuite Documentation
  • +
  • Virtual Machine Documentation
  • Compiler Documentation

    Defaults Flag

    @@ -495,7 +496,100 @@ $ cd gmqcc that need not be set), as well as missing tags, and error accordingly which will result in that task failing.

    - +

    Quake C Virtual Machine Documentation

    +

    + Included with GMQCC is a minimal implementation of the QCVM used in many game + engines. It's primarly used for the testsuite, but you may also use it as a + standalone runtime, or even embed it with existing appliciations. +

    +

    Running The Standalone VM

    +

    + To run the standalone application you need to have a compiled progs.dat, with an + entry function named  main  The main function can have any amount of arguments + as the standalone executor allows main to be invoked with your choice of arguments. + An example of invoking the VM: +

    $ ./qcvm progs.dat -float 200 #execute passing in 200 as a float to main
    + If  main  doesn't require arguments: +
    $ ./qcvm progs.dat #call main with no arguments
    + + The standalone executor supports the following arguments for passing arguments to  main  + + + + + + + + + + + + + + + + + + +
    ArgumentWhat it does
    -stringPasses in a string to main
    -floatPasses in a float to main
    -vectorPasses in a vector to main
    + + The order in which the arguments are expected for main, must be preserved, for + example if  main 's signature is the following: +
    void main(float a, vector b)
    + + Then to pass the arguments you'd use the same order: +
    $ ./qcvm -float 200 -vector '1 2 3'
    + +

    Additional Arguments

    + The standalone virtual machine has the following optional command line arguments: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ArgumentWhat it does
    -traceTrace the execution call hierarchy.
    -profileProfile the bytecode to find hotspots.
    -infoGet info of the running bytecode.
    -disasmDissasemble the bytecode into assembly.
    -printdefsPrints all definitions for the bytecode running.
    -printfieldsPrints all fields for the bytecode running.
    + +

    Builtins

    + The standalone virtual machine includes the following builtins. + + + + + + + + + + + + + +
    BuiltinNumber
    print1
    ftos2
    spawn3
    kill4
    vtos5
    error6
    vlen7
    etos8
    +

    Support or Contact

    Having trouble with GMQCC? Join our IRC channel at #kf-engine on irc.freenode.net or contact Us diff --git a/index.html b/index.html index 4115be0..62882af 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@

    GMQCC

    -

    An Improved Quake C Compiler

    +

    An Improved Quake C Compiler and tools