                    =================================
                                   acdc
                       A-code to ANSI C translator
                              Version 12.35
                    =================================

 The acdc translator converts A-code source of an adventure game into ANSI
 C source (.acd -> .c == acdc :-)). The derived C source files (the
 adv<nn>.c and adv<n>.h, where 'n' is a digit) need to be compiled and
 linked with the supplied adventure kernel sources (adv00.c, adv01.c and
 adv0.h) into an executable game.

 The translated code is created in the same directory in which the A-code
 source is specified, except that if that directory contains a
 subdirectory called C, the translated C code is placed there.

 From version 12.01, acdc works in two passes: first harvesting all
 defined identifiers, and then performing the translation. The upshot is,
 that from that version onwards, game entities (objects, places, texts,
 vocabulary words...) may be used before being defined. This allows, e.g.,
 co-recursive pairs of procedures and similar fun stuff.

 If kernel sources (adv00.c, adv01.c and adv0.h) are placed in the same
 directory as the ones created bt the acdc translator, a fully operational
 executiable can be created simply by compiling and linking the lot.
 Assuming gcc being the compiler (though any ANSI C compiler should do),
 the basic command line is

               gcc *.c -o -lreadline -lncurses <game_name>

 or if readline and ncurses libraries are not available

                   gcc *.c -o -DNO_READLINE <game_name>

 If the system does not have the unistd header file, add the -DNO_UNISTD
 symbol definition to the command line.

 See the kernel README file for more details.

 The acdc command line takes a number of optional arguments:

 
 (path)name     This is the name (or pathname) of the principal A-code
                source file. All includes specified by this file are
                taken to be relative to its location. If not supplied,
                the (path)name is prompted for. The ".acd" suffix may
                be omitted.
 -debug
 -d             Adds to the generated C source comment lines at the
                beginning of each procedure, identifying it by its
                A-code identity; adds to the generated C source comment
                lines showing the A-code source being processed; causes
                "headers" identification to be displayed at runtime.
 -plain
 -p             Causes acdc to create C sources with unencrypted game text.
 -preload
 -pr            Default keyword. Causes game texts to be pre-loaded into
                the game executable, instead of creating a separate .dat
                text file. *WARNING* Some older compilers and operating
                systems may declare the resulting executable to be too
                large. If this is the case, use one of the -file-memory,
                -file-page or -file-read keywords (see below for their
                descriptions).
 -file-memory
 -fm            Causes game texts to be written into a separate .dat file,
                which is loaded into memory dynamically on program startup.
                Deprecated. Don't use unless the default of -preload
                causes problems.
 -file-page [<npage>]
 -fp [<npage>]  Causes game texts to be written into a separate .dat file,
                which is read by the game as required using <npage> internal
                1KB page swap buffers. The default value of <npage> is 32
                and it is silently constrained to be no less than 16 and no
                greater than 128. Deprecated. Don't use unless the default
                of -preload causes problems.
 -file-read
 -fr            Causes game texts to be written into a separate .dat file,
                from which messages are read as required with no paging
                by the game. Deprecated. Don't use unless the default of
                -preload causes problems.
 -xref          Causes the complete program cross-referencing to
                be written into the cross-reference file <name>.xrf.
 -no-warnings
 -nw            Suppresses warning about unused symbols. 
 -quiet
 -q             Suppress progress messages.
 -version
 -v             Exit after displaying the version number.
 
 If the environment variable PLAIN is set, "-plain" is assumed on the
 command line. If the variable DEBUG is set, "-debug" is assumed.

                                                             Mike Arnautov
                                                            mla@mipmip.org
                                                          19 December 2016

 ==========================================================================
