This is a cache of https://vccplus.brianholman.com/manuals/toolchain-reference/command-line/. It is a snapshot of the page as it appeared on 2026-11-21T00:01:49.742+0000.
CMOC, LWASM and LWLINK command-line help · CMOC and LWTools references · VCC Plus
← Manual LibraryVCC Plus 3.7.1 · Reading on the web

Try the exercises in VCC Plus. Example links download files here; open them in the app to work beside the emulator.

Upstream reference

CMOC, LWASM and LWLINK command-line help

This complete text follows the pinned toolchain in this source tree. Published applications retain the reference edition packaged with their own build. VCC Plus behavior and additional C APIs are documented in the C manual and assembly manual.

Sections and continuation topics

Edition, source and license

Versioned output from the bundled tools. Capture details and checksums. CMOC and LWTools retain their respective CMOC and LWTools distribution notices.

Versioned command-line help

These complete help listings supplement the pinned CMOC 0.1.101 and LWTools 4.25 manuals. The capture origin and date are recorded separately for each tool below; a development capture does not identify a published application build. The assembler help includes VCC Plus extensions. An option being documented here does not enable it in a restricted assistant project build.

cmoc (cmoc 0.1.101)

Captured from the dual-architecture CMOC 0.1.101 reconciliation runtime for planned VCC Plus 3.7.1. This is not an official signed or published app capture. Capture date: 2026-11-16. Download complete cmoc help as text.

cmoc Version and notice


cmoc (cmoc 0.1.101)

Copyright (C) 2003-2023 Pierre Sarrazin <http://sarrazip.com/>
This program is free software; you may redistribute it under the terms of
the GNU General Public License, either version 3 or later.
This program comes with absolutely no warranty.

cmoc --help|-h

--help|-h            Display this help page and exit.

cmoc --version|-v

--version|-v         Display this program's version number and exit.

cmoc --verbose|-V

--verbose|-V         Display more informationg about the compiling process.

cmoc --preproc|-E

--preproc|-E         Copy preprocessor output to standard output (or to a file specified
                     with -o), instead of compiling.

cmoc -S

-S                   Stop after generating an assembly language file.

cmoc --compile|-c

--compile|-c         Stop after generating an object file.

cmoc -o FILE

-o FILE              Place the output in FILE (default: change C file extension to .bin).

cmoc --deps[=F]

--deps[=F]           Create a .d file containing a makefile rule giving the dependencies
                     of the compiled file. If a filename (F) is given, it is used instead
                     of forming the dependency filename from the code output filename.

cmoc --deps-only[=F]

--deps-only[=F]      Same, but do nothing else and stop.

cmoc -O0|-O1|-O2

-O0|-O1|-O2          Optimization level (default is 2). Compilation is faster with -O0.

cmoc -funsigned-char

-funsigned-char      Assume that `char' is unsigned by default.

cmoc -fsigned-char

-fsigned-char        Assume that `char' is signed by default. (This is the default.)

cmoc -fomit-frame-pointer Do not keep the frame pointer in a register for functions that do not

-fomit-frame-pointer Do not keep the frame pointer in a register for functions that do not
                     need one. Experimental. Use with caution.

cmoc --org=X

--org=X              Use X (in hex) as the first address at which to generate
                     the code; default: 2800.

cmoc --limit=X

--limit=X            Fail if program_end exceeds address X (in hex).

cmoc --data=X

--data=X             Use X (in hex) as the first address at which to generate the
                     writable global variable space; by default that space follows
                     the code.

cmoc --coco

--coco               Compile for the CoCo Disk Basic environment (default).

cmoc --decb

--decb               Synonym for --coco.

cmoc --dos

--dos                Compile to a CoCo Disk Basic track 34 boot loader (implies --coco).
                     Must be passed when compiling the .c file containing main().

cmoc --dragon

--dragon             Compile for the Dragon environment.

cmoc --thommo

--thommo             Compile for the Thomson MO.

cmoc --thomto

--thomto             Compile for the Thomson TO.

cmoc --os9

--os9                Compile for OS-9.

cmoc --flex

--flex               Compile for FLEX.

cmoc --vectrex

--vectrex            Compile for the Vectrex video game console.

cmoc --void-target

--void-target        Compile for a target that has no I/O system known to CMOC.

cmoc --usim

--usim               Compile for the USIM 6809 simulator.

cmoc --srec

--srec               Executable in Motorola SREC format.

cmoc --raw

--raw                Executable in raw format (passes --format=raw to lwlink)

cmoc --cpp=X

--cpp=X              Use X as the path to the C preprocessor (default: cpp).

cmoc --lwasm=X

--lwasm=X            Use X as the path to the LWTOOLS assembler.

cmoc --lwasm-pragma=X

--lwasm-pragma=X     Pass X to --pragma when invoking lwasm. Default: forwardrefmax
                     X must be a comma-separated list of terms accepted by lwasm --pragma.

cmoc --lwlink=X

--lwlink=X           Use X as the path to the LWTOOLS linker.

cmoc -Idir

-Idir                Add directory <dir> to the compiler's include directories
                     (also applies to assembler).

cmoc -Dxxx=yyy

-Dxxx=yyy            Equivalent to #define xxx yyy

cmoc -L dir

-L dir               Add a directory to the library search path.

cmoc -l name

-l name              Add a library to the linking phase. -lfoo expects `libfoo.a'.
                     This option must be specified after the source/object files.

cmoc -nodefaultlibs

-nodefaultlibs       Excludes CMOC-provided libraries from the linking phase.

cmoc --no-relocate

--no-relocate        Assume that the program will only be loaded at the addresses specified
                     by --org and --data. Not compatible with OS-9. Default for Vectrex.

cmoc --check-null

--check-null         Insert run-time checks for null pointers. See the manual.

cmoc --check-stack

--check-stack        Insert run-time checks for stack overflow. See the manual.
                     Not usable under OS-9, where stack checking is automatic.

cmoc --stack-space=N

--stack-space=N      Assume the stack may use as many as N bytes (in decimal).
                     Affects --check-stack and sbrk().
                     Must be used when compiling the main() function.
                     Not usable under OS-9, where stack checking is automatic.
                     Ignored when targeting Vectrex.

cmoc --add-os9-stack-space=N

--add-os9-stack-space=N
                     (OS-9 only.) Allocate N more bytes (in decimal) to the stack space
                     that OS-9 normally reserves.

cmoc --function-stack=N

--function-stack=N   (OS-9 only.) Emit code at the start of each function to check that there
                     is at least N bytes (in decimal) of free stack space in addition to
                     local variables. 0 means no stack checking. Default is 64.

cmoc --initial-s=X

--initial-s=X        Generate an immediate-mode LDS instruction as the first instruction
                     of the executable. Use X (in hex) as the argument.
                     Not compatible with --os9.

cmoc -Wsign-compare

-Wsign-compare       Warn when <, <=, >, >= used on operands of differing signedness.

cmoc -Wno-const

-Wno-const           Do not warn about const-incorrect code.

cmoc -Wgives-byte

-Wgives-byte         Warn about binary operations on bytes giving a byte.

cmoc -Wlocal-var-hiding

-Wlocal-var-hiding   Warn when a local variable hides another one.

cmoc -Wshadow

-Wshadow             Equivalent to -Wlocal-var-hiding.

cmoc -Wno-printf

-Wno-printf          Do not warn when printf/sprintf format is not a string literal.

cmoc -Wno-uncalled-static Do not warn when a static function is not called.

-Wno-uncalled-static Do not warn when a static function is not called.

cmoc -Wfor-condition-sizes

-Wfor-condition-sizes
                     Warn if a for() loop's condition compares values of different sizes.
                     Ex.: unsigned n = 256; for (unsigned char i = 0; i < n; ++i) {...}

cmoc -Wno-missing-field-initializers

-Wno-missing-field-initializers
                     Do no warn when a struct is initialized with fewer values than
                     there are fields.

cmoc -Wno-inline-asm-array-indexes

-Wno-inline-asm-array-indexes
                     Do not warn when an inline assembly statement uses an array index in
                     a C array variable reference. Such an index is taken as an element index,
                     not a byte index. (An index into a non-array is a byte index.)

cmoc -Wno-unknown-first-dim

-Wno-unknown-first-dim
                     Do not warn about arrays whose first dimension has an unknown size,
                     e.g., int a[] = { ... };

cmoc -Wno-array-size-zero Do not warn when an array has size zero.

-Wno-array-size-zero Do not warn when an array has size zero.

cmoc -Wno-too-many-elements

-Wno-too-many-elements
                     Do not warn about array initializers having more elements than the array
                     they initialize, e.g., int a[] = { 1, 2, 3 };

cmoc -Wno-shift-always-zero

-Wno-shift-always-zero
                     Do not warn about bit shifts that always gives a zero.

cmoc -Wno-label-on-declaration

-Wno-label-on-declaration
                     Do not warn when a label is put on a declaration.

cmoc -Wno-assign-in-condition

-Wno-assign-in-condition
                     Do not issue a warning when an assignment is used as a condition
                     in an if(), while() or do-while() statement.

cmoc -Waccept-word-sized-return-type-mismatch

-Waccept-word-sized-return-type-mismatch
                     Issue a warning instead of an error when the argument of a return
                     statement mismatches the return type of a function, and both types
                     are words, pointers or arrays. (Helps tolerate K&R code.)

cmoc -Wno-non-void-function-without-return

-Wno-non-void-function-without-return
                     Do not warn about non-void functions that have no return statement.

cmoc -Wno-return-without-argument-in-non-void-function

-Wno-return-without-argument-in-non-void-function
                     Do not warn about a return without an argument in a non-void function.

cmoc -Wno-calling-undeclared-function

-Wno-calling-undeclared-function
                     Do not warn about calling a function that has not been declared or defined.

cmoc -Wno-builtin-macro-redefined

-Wno-builtin-macro-redefined
                     Do not warn when a builtin macro gets redefined.
                     Useful to suppress warnings about `__cplusplus' macro.

cmoc -Werror

-Werror              Treat warnings as errors.

cmoc -w

-w                   Inhibit all warning messages.

cmoc --switch=MODE

--switch=MODE        Force all switch() statements to use MODE, where MODE is 'ifelse'
                     for an if-else sequence or 'jump' for a jump table.

cmoc --intermediate|-i

--intermediate|-i    Keep intermediate compilation and linking files.

cmoc --intdir=D

--intdir=D           Put intermediate files in directory D.

cmoc -x c

-x c                 Assume that files other than .s, .asm, .o and .a are C files.

cmoc -x none

-x none              Only consider .c files as C files.

Executable file formats:
  CoCo BIN for CoCo Disk Basic, Dragon, Thomson MO/TO; raw binary for Vectrex;
  SREC for FLEX, void-target and USIM; OS-9 for OS-9.
  Can be overridden by --srec or --raw, except for OS-9.

Preprocessor identifer _CMOC_VERSION_ is defined as: 1101

Compiler data directory: /tmp/vcc-cmoc.RErUziuv/cmoc

Compiler floating-point library directory: /tmp/vcc-cmoc.RErUziuv/cmoc/lib

For details, see the manual on the CMOC home page.

lwasm from lwtools 4.25

Retained unchanged from official VCC Plus 3.5.5 build 48. Capture date: 2026-11-10. Download complete lwasm help as text.

lwasm Version and notice

Usage: /Applications/VCC Plus.app/Contents/Resources/Toolchain/bin/lwasm [OPTION...] INPUTFILE
lwasm, a HD6309 and MC6809 cross-assembler

lwasm -3, --6309

  -3, --6309                  Set assembler to 6309 mode (default)

lwasm --6800compat

      --6800compat            Enable 6800 compatibility instructions,
                              equivalent to --pragma=6800compat

lwasm -9, --6809

  -9, --6809                  Set assembler to 6809 only mode

lwasm --abs

      --abs                   Generate absolute binary format, equivalent of

lwasm --format=abs

                              --format=abs

lwasm -d, --debug[=LEVEL]

  -d, --debug[=LEVEL]         Set debug mode

lwasm -b, --decb

  -b, --decb                  Generate DECB .bin format output, equivalent of

lwasm --format=decb

                              --format=decb

lwasm -D, --define=SYM[=VAL]

  -D, --define=SYM[=VAL]      Automatically define SYM to be VAL (or 1)

lwasm --depend

      --depend                Output a dependency list to stdout; do not do
                              any actual output though assembly is completed
                              as usual

lwasm --dependnoerr

      --dependnoerr           Output a dependency list to stdout; do not do
                              any actual output though assembly is completed
                              as usual; don't bail on missing include files

lwasm --dragon

      --dragon                Generate a Dragon DOS binary format, equivalent
                              of --format=dragon

lwasm --error-format=STYLE

      --error-format=STYLE    Error output style: lwasm (default), gcc, vs

lwasm -F, --flex

  -F, --flex                  Generate TSC Flex format output, equivalent of

lwasm --format=flex

                              --format=flex

lwasm -f, --format=TYPE

  -f, --format=TYPE           Select output format: decb, basic, raw, obj,
                              flex, os9, ihex, srec, dragon, abs

lwasm -I, --includedir=PATH

  -I, --includedir=PATH       Add entry to include path

lwasm -l, --list[=FILE]

  -l, --list[=FILE]           Generate list [to FILE]

lwasm --list-nofiles

      --list-nofiles          Omit file names in list output

lwasm --listcol=L,M,O,C

      --listcol=L,M,O,C       Set listing columns: label, mnemonic, operand,
                              comment (e.g. 0,8,16,32)

lwasm -m, --map[=FILE]

  -m, --map[=FILE]            Generate map [to FILE]

lwasm --no-output

      --no-output             Inhibit creation of output file

lwasm --no-warn=FLAG

      --no-warn=FLAG          Suppress warnings of the specified type

lwasm --obj

      --obj                   Generate proprietary object file format for
                              later linking, equivalent of --format=obj

lwasm -o, --output=FILE

  -o, --output=FILE           Output to FILE

lwasm -p, --pragma=PRAGMA

  -p, --pragma=PRAGMA         Set an assembler pragma to any value understood
                              by the "pragma" pseudo op

lwasm -P, --preprocess

  -P, --preprocess            Preprocess macros and conditionals and output
                              revised source to stdout

lwasm --project-inputs

      --project-inputs        Restrict all assembly inputs to the current
                              project folder

lwasm --project-map=FILE

      --project-map=FILE      Write physical source instruction locations for
                              a project snapshot

lwasm -r, --raw

  -r, --raw                   Generate raw binary format output, equivalent of

lwasm --format=raw

                              --format=raw

lwasm --symbol-dump[=FILE]

      --symbol-dump[=FILE]    Dump global symbol table in assembly format

lwasm -s, --symbols

  -s, --symbols               Generate symbol list in listing, no effect
                              without --list

lwasm --symbols-nolocals

      --symbols-nolocals      Same as --symbols but with local labels ignored

lwasm -t, --tabs=WIDTH

  -t, --tabs=WIDTH            Set tab spacing in listing (0=don't expand tabs)

lwasm --unicorns

      --unicorns              Add sooper sekrit sauce
  -?, --help                  give this help list

lwasm --usage

      --usage                 give a short usage message

lwasm -V, --version

  -V, --version               print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Please report bugs to [email protected].

Retained unchanged from official VCC Plus 3.5.5 build 48. Capture date: 2026-11-10. Download complete lwlink help as text.

Usage: /Applications/VCC Plus.app/Contents/Resources/Toolchain/bin/lwlink [OPTION...] INPUTFILE ...
lwlink, a HD6309 and MC6809 cross-linker

  -d, --debug                 Set debug mode
  -b, --decb                  Generate DECB .bin format output, equivalent of
                              --format=decb
  -e, --entry=SYM             Specify SYM as program entry point
  -F, --flex                  Generate TSC FLEX format output, equivalent of
                              --format=flex
  -f, --format=TYPE           Select output format: decb, raw, lwex, flex,
                              os9, srec, ihex, uniflex
  -l, --library=LIBSPEC       Read library libLIBSPEC.a from the search path
  -L, --library-path=DIR      Add DIR to the library search path
  -m, --map=FILE              Output information about the link
  -o, --output=FILE           Output to FILE
  -r, --raw                   Generate raw binary format output, equivalent of
                              --format=raw
  -s, --script=FILE           Specify the linking script (overrides the built
                              in defaults)
      --section-base=SECT=BASE Load section SECT at BASE
      --sysroot=DIR           Specify the path to replace an initial = with in
                              library paths
  -?, --help                  give this help list
      --usage                 give a short usage message
  -V, --version               print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Original VCC Plus manuals © 2026 Brian K. Holman. Third-party references retain their authors’ copyrights and licenses. Artwork notices. Edition 3.7.1; source and export identity.

A closer look

Open original