R3X VM options
The Virtual Machine can accept several options from the command line, this document will provide a list of these
commands and a brief description and their usage.
The following are the options that can be passed to "rxvm":
-exe [exename]: Specifies the executable file to be run
-stack [stacksize]: Specifies the stack size limit (default is 0x100000 of stack space [DWORDS])
-h or --help: Display VM version and licensing information
-f [frequency]: Specify the CPU frequency (floating point) in kilohertz.
-s: Runs the VM in client mode. (Should only be used by server programs.)
-w [width]: Specify OpenGL terminal width
-w [height]: Specify OpenGL terminal height
-fo [fontpath]: Specify a PNG file containing a bitmap font (256 characters, can be 128x128 or 256x256)
-fw [width]: Specify font width
-fh [height]: Specify font height
-fs [scale]: Specify font scale (floating point)
-args "[arguments]": Specify program arguments to VM. (this will be passed to your program)
-rs [scriptpath]: Specify R3X script configuration file (see below)
Using the configure script feature
If you do not like using the command line and instead want to directly pass the your settings to the VM through a file, you
can use the "-rs" option to pass the configure script's path to the VM. Note that all your command line settings will be
overwritten by those in the configuration file.
Configure script syntax
executable: "[exename]"
Specify executable name.
args: "[args]"
Specify arguments
font_file: "[font name]"
Specify font file name (Must be a PNG-Bitmap font: 128x128, 256x256, 512x512)
font_height: [integer value]
Specify font height
font_width: [integer value]
Specify font width
font_scale: [float value]
Specify font scale
screen_width: [integer value]
Specify screen width (in pixels)
screen_height: [integer value]
Specify screen height (in pixels)
stack: [integer value]
Specify max stack size
end:
End of Script
An example script
Below is an example of running args.exe with the appropriate options:
executable: "args.exe"
font_height: 16
font_width: 16
font_scale: 1.0f
args: "hello, world!"
end:
(NOTE: The "end:" is not needed, but is recommended.)
You can also use enviroment variables in strings, for example executable: "$EXEC_FILE_NAME" will set the executable to the enviroment variable
pointed by "EXEC_FILE_NAME".