+ EnableRegVars = 1;
+}
+
+
+
+static void OptRodataName (const char* Opt attribute ((unused)), const char* Arg)
+/* Handle the --rodata-name option */
+{
+ /* Check for a valid name */
+ CheckSegName (Arg);
+
+ /* Set the name */
+ NewSegName (SEG_RODATA, Arg);
+}
+
+
+
+static void OptSignedChars (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
+/* Make default characters signed */
+{
+ SignedChars = 1;
+}
+
+
+
+static void OptStaticLocals (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
+/* Place local variables in static storage */
+{
+ StaticLocals = 1;
+}
+
+
+
+static void OptTarget (const char* Opt attribute ((unused)), const char* Arg)
+/* Set the target system */
+{
+ SetSys (Arg);
+}
+
+
+
+static void OptVerbose (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
+/* Increase verbosity */
+{
+ ++Verbosity;
+}
+
+
+
+static void OptVersion (const char* Opt attribute ((unused)),
+ const char* Arg attribute ((unused)))
+/* Print the assembler version */
+{
+ fprintf (stderr,
+ "cc65 V%u.%u.%u\n",
+ VER_MAJOR, VER_MINOR, VER_PATCH);
+}
+
+
+
+int main (int argc, char* argv[])
+{
+ /* Program long options */
+ static const LongOpt OptTab[] = {
+ { "--add-source", 0, OptAddSource },
+ { "--ansi", 0, OptAnsi },
+ { "--bss-name", 1, OptBssName },
+ { "--check-stack", 0, OptCheckStack },
+ { "--code-name", 1, OptCodeName },
+ { "--codesize", 1, OptCodeSize },
+ { "--cpu", 1, OptCPU },
+ { "--create-dep", 0, OptCreateDep },
+ { "--data-name", 1, OptDataName },
+ { "--debug", 0, OptDebug },
+ { "--debug-info", 0, OptDebugInfo },
+ { "--debug-opt", 1, OptDebugOpt },
+ { "--disable-opt", 1, OptDisableOpt },
+ { "--enable-opt", 1, OptEnableOpt },
+ { "--forget-inc-paths", 0, OptForgetIncPaths },
+ { "--help", 0, OptHelp },
+ { "--include-dir", 1, OptIncludeDir },
+ { "--list-opt-steps", 0, OptListOptSteps },
+ { "--register-space", 1, OptRegisterSpace },
+ { "--register-vars", 0, OptRegisterVars },
+ { "--rodata-name", 1, OptRodataName },
+ { "--signed-chars", 0, OptSignedChars },
+ { "--static-locals", 0, OptStaticLocals },
+ { "--target", 1, OptTarget },
+ { "--verbose", 0, OptVerbose },
+ { "--version", 0, OptVersion },
+ };
+
+ unsigned I;