A-code game command line options

(A-code version 12.73)

This document describes command line options available when running an A-code game. Game behaviour is generally regulated by the internally documented acode.conf file, which can be found in the .acode directory (just acode on MS platforms), automatically created in player's home directory. Where command line options refer to particular features covered by the configuration file, they override the configuration file settings.


  • Angle brackets <string> denote a symbolic string to be replaced by something appropriate. E.g. <filename> would be replaced by the name of a file (with no surrounding angel brackets).
  • Square brackets [ ] denote something optional. So e.g. -l[<logfilename>] means that the name of the log file may be omitted.
  • Braces { } denote a list of permissible values, separated by vertical bars |. E.g. -b[{0|1|2}] means the -b may be optionally (square brackets!) followed by one of the three digits zero,one or two.
  • All options are shown with a short (single dash) prefix, but double dashes are also accepted.
  • Where a value can be specified with a command line option, the syntax shown is that of the value abutting directly to the option specification letter. However, an equality sign = can be placed between the two, so that -b0 is equivalent to -b=0.

The following command line options are valid for both the browser and the console display modes:

Force a new game. By default, if a previous game session got somehow forcibly interrupted (e.g. by the game process being killed for whatever reason), the interrupted session is automatically resumed when the game is restarted. The -n option overrides this behaviour and forces the interrupted session to be forgotten.

Restore game from dump. Ignored if the game does not support game dump files being specified on the command line. The -r optional in that any command line argument which does not begin with a dash will be interpreted as the name of the dumpfile to restore on invocation.

Log the game. Specifies the file into which a session log is to be written. The log is human-readable, but has some additional information useful for debugging. If the nominated logfile already exists, it gets appended to. If no logfile is specified the name of the game is used, suffixed with .log.

Browser mode executables only. Use a non-default browser for player interaction. Browsers can be specified by their pathname, or by their name – in the latter case the name is searched for in directories given by the PATH variable.

For browser-mode executables, Force console display – i.e. do not use the browser interface. For could mode executables this option requests plain text (i.e. non-HTML) output, which is useful in debugging.

Set or invert the blank line setting. If set to zero blank lines are inserted before and after each prompt. If the value is 1, blank lines around '?' prompts are suppressed, resulting in a more compact display. If the value is 2, then ALL blank lines are suppressed, for super-compact, but less readable output. If no value is specified, the new setting is 0 or 1, inverting the A-code default for this game. In old-style A-code (Adv550), which does not distinguish between replies to queries and general commands, this only affects presence/absence of a blank line after the prompt line, and never before it.

Set the initial state of undo-history collection. Ignored if the game does not support undo. If the value is zero, the default undo status is OFF. If the value is one, the default undo status is ON. The "none" state implies OFF and disallows undo functionality being subsequently switched on from within the game. The default state is ON for games which define the verb UNDO, and "none" otherwise.

Show the game, kernel and acdc version numbers and exit.

Print command line usage summary appropriate to the mode of the executable's build.

In addition, some options are only meaningful in the console display mode, and are simply ignored in other modes.

Set text mode to wrap (0) or justify (1). If no value is specified, invert the default A-code setting for this game. In wrap mode, text is simply broken into lines according to the screen width (see the -s option below). With justification turned on, each line is right-justified. All of this presupposes a fixed font being in use. For variable font devices, which tend to do their own wrapping, the default screen width should be set to zero, meaning "infinite", and the margin should be specified as zero too. This option is ignored by games written in the "old style" A-code (i.e. by adv550).

Set screen size (width in fixed font characters, height in lines, and margin in fixed font blanks). The default screen dimension is 80x24-1, the margin being set to 1 character. The -s option allows a different screen size (and optionally margin) to be specified. Screen width of zero means "infinite" width. Note that the line length cannot be set to less than 16 characters and the minimal number of lines per screen is 5.

Set the output speed as specified by the argument. Meaningful only in the "dumb" console mode and only if C sources compiled without the NO_SLOW symbol. Baud rate is specified in bits per second, and taking into the account control and parity bits, the output speed in characters per second is simply the baud rate divided by 10. The game coerces the specified baud rate to the nearest lower standard value (one of 110, 300, 600, 1200, 2400, 4800 and 9600), except that anything below 110 (the speed of a teletype) is also treated as 110. The default value is 300 - the speed of a DECwriter. Note, however, that under DOS and Windows any baud rate above 600 results in no slowdown at all.

Pause on exit. Requests that after printing the final exit message the game should prompt the player for a <CR>, before exiting. This feature is intended for players who wish to play console version of the game, in a window which closes as soon as the game exits.

The functionality of the -s, -u and -j options is also provided via kernel hooks (see procedure special() in the kernel source file adv00.c), so that the game may -- at author's discretion -- offer the player commands for toggling the justification switch, switching on and off the change history, and altering screen size and margin.

Finally, if the game was build to have a separate data file (only useful for DOS builds, nowadays), a non-default location of that file may be specified via the -d option.

If using a data file, specify its directory. Ignored if the game is built as a simple executable with no associated data file. By default, the game data file is assumed to live in the same directory as the executable. The -d option allows a separate location to be specified. The program will attempt to work out the separator which should follow the directory name, but if in doubt as to the appropriate one for the given platform, the dbs name will be simply concatenated with the supplied pathname -- hence if it doesn't work, try adding the trailing separator to the pathname.

Any unknown or suppressed keywords are quietly ignored.

Back to the A-code page

To the Mipmip home page
Feel free to leave a comment!
Mike Arnautov (11 January 2017)